From 85c009b8ab74415d9d00c635e21b13c5530bd3ff Mon Sep 17 00:00:00 2001 From: Julien Dramaix Date: Fri, 6 Jul 2012 15:28:26 +0000 Subject: [PATCH] allows more http methods --- .../com/google/gwt/query/client/plugins/ajax/Ajax.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/ajax/Ajax.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/ajax/Ajax.java index 5b727aba..02588a20 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/ajax/Ajax.java +++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/ajax/Ajax.java @@ -236,7 +236,17 @@ public class Ajax extends GQuery { String method = settings.getType(); if ("get".equalsIgnoreCase(method)) { return RequestBuilder.GET; + }else if("post".equalsIgnoreCase(method)){ + return RequestBuilder.POST; + }else if("put".equalsIgnoreCase(method)){ + return RequestBuilder.PUT; + }else if("delete".equalsIgnoreCase(method)){ + return RequestBuilder.DELETE; + }else if("head".equalsIgnoreCase(method)){ + return RequestBuilder.HEAD; } + + GWT.log("unknow method type -> use POST as default method"); return RequestBuilder.POST; } -- 2.39.5