public final class HTTPRequest extends Object
public HTTPRequest header(String name, String value)
name - the name of the headervalue - the value of the headerpublic HTTPRequest queryParam(String name, String value)
name - the name of the query parametervalue - the value of the query parameterpublic HTTPRequest pathParam(String name, String value)
name - the name of the path parametervalue - the value of the path parameterpublic HTTPRequest timeout(int newTimeout)
newTimeout - Timeout in mspublic HTTPRequest followRedirect(boolean follow)
follow - true to automatically follow redirects; false otherwisepublic HTTPRequest userAgent(String agent)
agent - the user agent string to usepublic HTTPRequest contentType(String type)
type - the Content-Typepublic HTTPRequest auth(String authString)
authString - the Authorization headerpublic HTTPRequest authBasic(String user, String password)
user - the usernamepassword - the passwordpublic HTTPRequest authBearer(String accessToken)
accessToken - the OAuth2 Bearer access tokenpublic HTTPRequest accept(String type)
type - the Accept typepublic HTTPRequest body(String bodyString)
bodyString - the body entitypublic HTTPRequest form(Map<String,String> form)
form - the form contentpublic org.apache.http.HttpResponse get()
HttpResponsepublic org.apache.http.HttpResponse put()
HttpResponsepublic org.apache.http.HttpResponse patch()
HttpResponsepublic org.apache.http.HttpResponse post()
HttpResponsepublic org.apache.http.HttpResponse delete()
HttpResponsepublic org.apache.http.HttpResponse options()
HttpResponsepublic org.apache.http.HttpResponse head()
HttpResponsepublic void getAsync(HTTPResponseCallback callback)
callback - HTTPResponseCallbackpublic void getAsync(Executor executor, HTTPResponseCallback callback)
executor - Thread poolcallback - HTTPResponseCallbackpublic void putAsync(HTTPResponseCallback callback)
callback - HTTPResponseCallbackpublic void putAsync(Executor executor, HTTPResponseCallback callback)
executor - Thread poolcallback - HTTPResponseCallbackpublic void patchAsync(HTTPResponseCallback callback)
callback - HTTPResponseCallbackpublic void patchAsync(Executor executor, HTTPResponseCallback callback)
executor - Thread poolcallback - HTTPResponseCallbackpublic void postAsync(HTTPResponseCallback callback)
callback - HTTPResponseCallbackpublic void postAsync(Executor executor, HTTPResponseCallback callback)
executor - Thread poolcallback - HTTPResponseCallbackpublic void deleteAsync(HTTPResponseCallback callback)
callback - HTTPResponseCallbackpublic void deleteAsync(Executor executor, HTTPResponseCallback callback)
executor - Thread poolcallback - HTTPResponseCallbackpublic void optionsAsync(HTTPResponseCallback callback)
callback - HTTPResponseCallbackpublic void optionsAsync(Executor executor, HTTPResponseCallback callback)
executor - Thread poolcallback - HTTPResponseCallbackpublic void headAsync(HTTPResponseCallback callback)
callback - HTTPResponseCallbackpublic void headAsync(Executor executor, HTTPResponseCallback callback)
executor - Thread poolcallback - HTTPResponseCallbackCopyright © 2012–2017 Taimos GmbH. All rights reserved.