Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix #2532594. Save objectified data to config if initially a string. #243

Closed
wants to merge 2 commits into from

2 participants

@apipkin

mention @ericf

@ericf ericf commented on the diff
src/io/js/io-base.js
@@ -642,6 +642,7 @@ IO.prototype = {
// querystring-stringify-simple.
if ((Y.Lang.isObject(data) && !data.nodeType) && !transaction.upload) {
data = Y.QueryString.stringify(data);
+ config.data = data;
@ericf Owner
ericf added a note

Shouldn't this be config.body = data? To match what it does in Node.js?

@apipkin
apipkin added a note
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@ericf
Owner

These need tests, docs, and change history. They will be dealt with post 3.7.0.

@jenny jenny referenced this pull request
Merged

Io custom transport #383

@ericf
Owner

This is trumped by #383

@ericf ericf closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 7, 2012
  1. @apipkin
Commits on Sep 11, 2012
  1. @apipkin
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +2 −1  src/io/js/io-base.js
View
3  src/io/js/io-base.js
@@ -632,7 +632,7 @@ IO.prototype = {
u = uri,
response = {};
- config = config ? Y.Object(config) : {};
+ config = Y.merge(config);
transaction = io._create(config, id);
method = config.method ? config.method.toUpperCase() : 'GET';
sync = config.sync;
@@ -642,6 +642,7 @@ IO.prototype = {
// querystring-stringify-simple.
if ((Y.Lang.isObject(data) && !data.nodeType) && !transaction.upload) {
data = Y.QueryString.stringify(data);
+ config.data = data;
@ericf Owner
ericf added a note

Shouldn't this be config.body = data? To match what it does in Node.js?

@apipkin
apipkin added a note
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
}
if (config.form) {
Something went wrong with that request. Please try again.