Created
April 25, 2013 13:31
-
-
Save mrmike/5459700 to your computer and use it in GitHub Desktop.
Snippet for creating httpRequests
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
// Add this template in Preferences > Java > Editor > Templates > New | |
// I stored this snippet with newRequest name, but you can use any name you want | |
String url = new GetBuilder(${url}).appendPathSegment(${path}) | |
.build(); | |
Http${type} request = new Http${type}(url); | |
setupDefaultHeaders(request); | |
HttpResponse response = getHttpClient().execute(request); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment