1 16 package com.google.gwt.user.client.impl; 17 18 import com.google.gwt.core.client.JavaScriptObject; 19 import com.google.gwt.user.client.ResponseTextHandler; 20 21 25 public class HTTPRequestImpl { 26 27 public boolean asyncGet(String url, ResponseTextHandler handler) { 28 return asyncGet(null, null, url, handler); 29 } 30 31 public boolean asyncGet(String user, String pwd, String url, 32 ResponseTextHandler handler) { 33 return asyncGetImpl(user, pwd, url, handler); 34 } 35 36 public boolean asyncPost(String url, String postData, 37 ResponseTextHandler handler) { 38 return asyncPost(null, null, url, postData, handler); 39 } 40 41 public boolean asyncPost(String user, String pwd, String url, 42 String postData, ResponseTextHandler handler) { 43 return asyncPostImpl(user, pwd, url, postData, handler); 44 } 45 46 public JavaScriptObject createXmlHTTPRequest() { 47 return doCreateXmlHTTPRequest(); 48 } 49 50 53 protected native JavaScriptObject doCreateXmlHTTPRequest() ; 56 57 private native boolean asyncGetImpl(String user, String pwd, String url, 58 ResponseTextHandler handler) ; 83 84 private native boolean asyncPostImpl(String user, String pwd, String url, 85 String postData, ResponseTextHandler handler) ; 110 } 111 | Popular Tags |