]> source.dussan.org Git - gwtquery.git/commitdiff
best handling of data for PUT method
authorJulien Dramaix <julien.dramaix@gmail.com>
Fri, 6 Jul 2012 15:31:12 +0000 (15:31 +0000)
committerJulien Dramaix <julien.dramaix@gmail.com>
Fri, 6 Jul 2012 15:31:12 +0000 (15:31 +0000)
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/ajax/Ajax.java

index 02588a20b2133545ff73e09f9cd06db850242198..58ac3f6227a0bd74e9e2392e8b6cfd9929a82d72 100644 (file)
@@ -222,7 +222,7 @@ public class Ajax extends GQuery {
     if (data == null && settings.getData() != null) {
       String type = settings.getDataType();
       if (type != null 
-          && httpMethod == RequestBuilder.POST
+          && (httpMethod == RequestBuilder.POST || httpMethod == RequestBuilder.PUT)
           && type.equalsIgnoreCase("json")) {
         data = settings.getData().toJsonString();
       } else {