Mootools-core 1.4.5 Request.JSON doesn't work with WCF for post method #2448

Open
stkap opened this Issue Nov 23, 2012 · 0 comments

Comments

Projects
None yet
1 participant

stkap commented Nov 23, 2012

Mootools-core 1.4.5 Request.JSON doesn't work with WCF for post method because of spoiled Content-Type attribute in lines:

if (this.options.urlEncoded && ['post', 'put'].contains(method)){
     var encoding = (this.options.encoding) ? '; charset=' + this.options.encoding : '';
     this.headers['Content-type'] = 'application/x-www-form-urlencoded' + encoding;
}

Such Content-Type is for web-form, but is not for json. For json it must be "application/json".

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/55835-mootools-core-1-4-5-request-json-doesn-t-work-with-wcf-for-post-method?utm_campaign=plugin&utm_content=tracker%2F22067&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F22067&utm_medium=issues&utm_source=github).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment