On Jun 19, 2006, at 2:01 PM, Boczek wrote:

> example from my code:
>
> function postJSONDoc(url, postBody) {
>     var postBody = queryString(postBody);
>     var req = getXMLHttpRequest();
>
>     req.open('POST', url, true);
>     req.setRequestHeader('Content-type',
> 'application/x-www-form-urlencoded');
>     var d_POST = sendXMLHttpRequest(req, postBody);
>     d_POST.addCallbacks(evalJSONRequest);
>
>     return d_POST;
> }

This is exactly why MochiKit doesn't currently have a POST function.  
You're posting x-www-form-urlencoded, but you're receiving a JSON  
document. Some people will want to post JSON, others will need to set  
additional headers, etc.

-bob


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/mochikit
-~----------~----~----~----~------~----~------~--~---

Reply via email to