Skip to content

Commit

Permalink
pass stringified data to custom transport layer
Browse files Browse the repository at this point in the history
  • Loading branch information
jafl committed Jan 2, 2013
1 parent de1fb6f commit 259a804
Show file tree
Hide file tree
Showing 10 changed files with 153 additions and 163 deletions.
182 changes: 93 additions & 89 deletions build/io-base/io-base-coverage.js

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions build/io-base/io-base-debug.js
Expand Up @@ -645,10 +645,15 @@ IO.prototype = {
sync = config.sync;
data = config.data;

// Serialize an map object into a key-value string using
// Serialize a map object into a key-value string using
// querystring-stringify-simple.
if ((Y.Lang.isObject(data) && !data.nodeType) && !transaction.upload) {
data = Y.QueryString.stringify(data);
if (Y.QueryString && Y.QueryString.stringify) {
Y.log('Stringifying config.data for request', 'info', 'io');
config.data = data = Y.QueryString.stringify(data);
} else {
Y.log('Failed to stringify config.data object, likely because `querystring-stringify-simple` is missing.', 'warn', 'io');
}
}

if (config.form) {
Expand Down
2 changes: 1 addition & 1 deletion build/io-base/io-base-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions build/io-base/io-base.js
Expand Up @@ -645,10 +645,13 @@ IO.prototype = {
sync = config.sync;
data = config.data;

// Serialize an map object into a key-value string using
// Serialize a map object into a key-value string using
// querystring-stringify-simple.
if ((Y.Lang.isObject(data) && !data.nodeType) && !transaction.upload) {
data = Y.QueryString.stringify(data);
if (Y.QueryString && Y.QueryString.stringify) {
config.data = data = Y.QueryString.stringify(data);
} else {
}
}

if (config.form) {
Expand Down

0 comments on commit 259a804

Please sign in to comment.