Created
May 19, 2010 03:24
-
-
Save pk11/405913 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import static com.my.utils.HttpHelper.*; | |
//Perform a GET | |
String response = performGet("http://mysite.com"); | |
//do something with response | |
//Perform a more complex GET | |
Map<String,String> headers = new HashMap<String,String>(); | |
headers.put("special","header"); | |
String response = performGet("http://mysite.com","john","password",headers); | |
//do something with response | |
//Perform a POST | |
Map<String,String> params = new HashMap<String,String>(); | |
params.put("name","john"); | |
performPost("http://mysite.com",params) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment