public class HttpPostRequest extends AbstractHttpRequest
Modifier and Type | Field and Description |
---|---|
protected String |
method |
auth, DEFAULT_ENCODING, url, USER_AGENT
Constructor and Description |
---|
HttpPostRequest(String url)
Constructor
|
HttpPostRequest(String url,
Authentication auth)
Constructor
|
HttpPostRequest(String url,
Map<String,Serializable> fields)
Constructor
|
HttpPostRequest(String url,
Map<String,Serializable> fields,
Authentication auth)
Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
getHttpResponseCode()
Performs a field-less POST request to the provided URL using basic auth and
returns the HTTP code.
|
org.json.JSONObject |
getJsonResponse()
Performs a POST request to the given URL, using the authentication
details and POST fields provided.
|
convertStreamToString, validate
protected String method
public HttpPostRequest(String url) throws HelloSignException
url
- StringHelloSignException
- thrown if there is a problem making
the HTTP request or processing the responsepublic HttpPostRequest(String url, Authentication auth) throws HelloSignException
url
- Stringauth
- AuthenticationHelloSignException
- thrown if there is a problem making
the HTTP request or processing the responsepublic HttpPostRequest(String url, Map<String,Serializable> fields) throws HelloSignException
url
- Stringfields
- MapHelloSignException
- thrown if there is a problem making
the HTTP request or processing the responsepublic HttpPostRequest(String url, Map<String,Serializable> fields, Authentication auth) throws HelloSignException
url
- Stringfields
- Mapauth
- AuthenticationHelloSignException
- thrown if there is a problem making
the HTTP request or processing the responsepublic org.json.JSONObject getJsonResponse() throws HelloSignException
HelloSignException
- thrown if there is a problem making the HTTP
request or processing the resultpublic int getHttpResponseCode() throws HelloSignException
HelloSignException
- thrown if there is a problem making the HTTP
request or processing the resultCopyright © 2016 HelloSign. All rights reserved.