Jaxer.Web.post and XMLRPC
March 13th, 2008 | Design & Development |I've been playing around a little with Jaxer lately. I really like the ease of Cross Domain javascript calls. Just a quick note though. I've been testing the Jaxer.Web.post call against the wordpress XMLRPC.
I kept getting responses saying that the the server only accepted POST requests. But I was using Jaxer.web.post.
So I scratched my head for a while. And then some.
Eventually I figured that the body of the post request was not being set. Then I discovered that Jaxer.Web.post defaults it's content type header to "application/x-www-form-urlencoded" which, as far as I know, passes the data in a querystring format and not in the post body. The simple fix was to change the content type to "text/xml" like so :
-
Jaxer.Web.post(url,body,{contentType: "text/xml"});
The call worked perfectly after that.








March 14th, 2008 at 4:52 pm
John — Thanks for shaing this Jaxer tip with the commuity.
I’ve added a reference to it in the aptana forums @ http://forums.aptana.com.
Any ideas for enhancements or improvements to Jaxer would be appreciated. We have a ASAP system for capturing those @ http://support.aptana.com.
If you have any live Jaxer apps running on the Wbe, let us know. We’re in the porcess of putting together a showcase area of Aptana Jaxer apps.
–Kevin