Created
May 25, 2012 19:28
-
-
Save arschles/2790038 to your computer and use it in GitHub Desktop.
HttpService Simple GET Request
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
@Override | |
public ResponseToProcess execute(ProcessedAPIRequest request, SDKServiceProvider provider) { | |
HttpService http = provider.getHttpService(); | |
String url = "http://stackmob.com"; | |
GetRequest req = new GetRequest(url); | |
HttpResponse resp = http.get(req); | |
Map<String, String> map = new HashMap<String, String>(); | |
map.put("response_code", resp.getCode()); | |
map.put("url", url); | |
return new ResponseToProcess(HttpURLConnection.HTTP_OK, map); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment