REST ( http://en.wikipedia.org/wiki/REST ) is a nice, clean and simple
way to make a (kind of) web service.

to read data, you have to use a GET method with a Content-Type to
choose in what format you want your data.
but jquery.ajax (ignore|don't send) the content-Type parameter with
the GET method (with REST, you can't and you must not use a POST
method to read data, as it was initially defined in the HTTP protocol
(POST is used to write data)).

here is the patch I suggest to make jquery REST/GET "compatible" :

line #2704 of jquery-1.2.6.js
- if ( s.data )
+ if ( s.data || s.contentType!=ajaxSettings.contentType )

that's means, if the user precises a content type, it's used, even for
the GET method (s.data is erased with a get after have been concatened
to the url).

is there a more "elegant" way to do it?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" 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/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to