« Return to Thread: Sending JSON Data to a server

Re: Sending JSON Data to a server

by Maulin Shah, MD :: Rate this Message:

Reply to Author | View in Thread

dojox.rpc.Rest uses rawXhr, and is becoming very popular, so I really  
don't think it will be deprecated.

On Aug 7, 2008, at 5:27 AM, Jochen Luig wrote:

> Hi,
>
> Am Donnerstag, den 07.08.2008, 12:11 +0000 schrieb Anthony Fryer:
>> I send json to the server using xhrPost by assigning the json a
>> parameter.
>>
>> ie.
>>
>> dojo.xhrPost({
>>  url: './blah',
>>  content: { json: dojo.toJson(myJsonObject) }
>> });
>>
>> On the server i just get the "json" parameter value and deserialize
>> it.
>
> Yes, I read about that approach in the forums. The problem with this  
> is
> that my server will just take the HTTP-Request's body and try to
> serialize it. Thus, your way will leave me having to deserialize the
> data myself (as long as I don't want to introduce some ugly hack  
> into my
> App).
>
> Bye,
>
> Jochen
>
> _______________________________________________
> FAQ: http://dojotoolkit.org/support/faq
> Book: http://dojotoolkit.org/docs/book
> Forums: http://dojotoolkit.org/forum
> Dojo-interest@...
> http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest

_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://dojotoolkit.org/docs/book
Forums: http://dojotoolkit.org/forum
Dojo-interest@...
http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest

 « Return to Thread: Sending JSON Data to a server