public class HTTPRequest extends Object
| Constructor and Description |
|---|
HTTPRequest(String url) |
| Modifier and Type | Method and Description |
|---|---|
HTTPRequest |
accept(String type) |
HTTPRequest |
auth(String authString) |
HTTPRequest |
authBasic(String user,
String password) |
HTTPRequest |
authBearer(String accessToken) |
HTTPRequest |
body(String bodyString) |
HTTPRequest |
contentType(String type) |
org.apache.http.HttpResponse |
delete() |
org.apache.http.HttpResponse |
get() |
HTTPRequest |
header(String name,
String value) |
org.apache.http.HttpResponse |
options() |
HTTPRequest |
pathParam(String name,
String value) |
org.apache.http.HttpResponse |
post() |
org.apache.http.HttpResponse |
put() |
HTTPRequest |
queryParam(String name,
String value) |
public HTTPRequest(String url)
url - 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 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 org.apache.http.HttpResponse get()
HttpResponsepublic org.apache.http.HttpResponse put()
HttpResponsepublic org.apache.http.HttpResponse post()
HttpResponsepublic org.apache.http.HttpResponse delete()
HttpResponsepublic org.apache.http.HttpResponse options()
HttpResponseCopyright © 2012-2013 Taimos GmbH. All Rights Reserved.