I want to use JSONP to connect to a REST webservice to avoid an
additional proxy. But the jquery lib adds the JSONP callback parameter
only to the URL if GET is used as request type, but not on DELETE, PUT
& POST.

I modified the jquery lib to avoid that problem like this:

3409:           // Handle JSONP Parameter Callbacks
3410:           if ( s.dataType == "jsonp" ) {
3411://                 if ( type == "GET" ) {
3412:                           if ( !s.url.match(jsre) )
3413:                                   s.url += (s.url.match(/\?/) ? "&" : 
"?") + (s.jsonp ||
"callback") + "=?";
3414://                 } else if ( !s.data || !s.data.match(jsre) )
3415://                         s.data = (s.data ? s.data + "&" : "") + 
(s.jsonp ||
"callback") + "=?";
3416:                   s.dataType = "json";
3417:           }

Is there an other way to workaround that problem without modifying the
lib that I don't found?

Reply via email to