Skip to content

Instantly share code, notes, and snippets.

@arschles
Created May 25, 2012 19:28
Show Gist options
  • Save arschles/2790038 to your computer and use it in GitHub Desktop.
Save arschles/2790038 to your computer and use it in GitHub Desktop.
HttpService Simple GET Request
@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