xhr.setHeader('Content-type', 'application/json') fails to set Content-type header.
-
MadRabbit
Hi Yesudeep,
There's a default option called 'urlEncoded', which is true by default
and it forces the formencoded content type. You could avoid the thing
by doing the things like thatnew Xhr('/api', {
urlEncoded: false, onSuccess: function() {// log it here}; }) .setHeader('Content-type', 'application/json') .send(....);
But I see your point and think it a good idea if it would keep the
user defined content-type. will fix it. -
Yesudeep Mangalapilly
Oh, nice. I can probably use that suggestion to go right ahead.
However, yes, I second that it would be good to keep the user
defined content-type.Thanks. :-)
-
MadRabbit
- State changed from new to resolved
I've updated the build on the server. Now it includes a patch for your case
Please let me know how is it going with you using RightJS
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.