1 16 package com.google.gwt.user.client; 17 18 import com.google.gwt.core.client.GWT; 19 import com.google.gwt.user.client.impl.HTTPRequestImpl; 20 21 25 public class HTTPRequest { 26 27 private static final HTTPRequestImpl httpRequest = (HTTPRequestImpl) GWT.create(HTTPRequestImpl.class); 28 29 37 public static boolean asyncGet(String url, ResponseTextHandler handler) { 38 return httpRequest.asyncGet(url, handler); 39 } 40 41 49 public static boolean asyncGet(String user, String pwd, String url, 50 ResponseTextHandler handler) { 51 return httpRequest.asyncGet(user, pwd, url, handler); 52 }; 53 54 63 public static boolean asyncPost(String url, String postData, 64 ResponseTextHandler handler) { 65 return httpRequest.asyncPost(url, postData, handler); 66 } 67 68 77 public static boolean asyncPost(String user, String pwd, String url, 78 String postData, ResponseTextHandler handler) { 79 return httpRequest.asyncPost(user, pwd, url, postData, handler); 80 }; 81 } 82 | Popular Tags |