public final class HttpPostRequest extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
HttpPostRequest.Builder |
| Modifier and Type | Method and Description |
|---|---|
String |
contentType()
Gets a type of content.
|
byte[] |
payload()
Gets a payload of a request.
|
String |
payloadAsString()
Gets a string representation of a payload.
|
static HttpPostRequest.Builder |
to(URI uri)
A factory method that start a process of the request
creation.
|
static HttpPostRequest.Builder |
to(URIBuilder uriBuilder)
A factory method that starts a process of the request
creation.
|
String |
toString() |
URI |
uri()
Gets a URI
|
public static HttpPostRequest.Builder to(URI uri)
uri - URI as a target server where a request will be sent.IllegalArgumentException - if uri is nullpublic static HttpPostRequest.Builder to(URIBuilder uriBuilder)
uriBuilder - a builder of URI, must not be nullIllegalArgumentException - if uriBuilder is nullpublic URI uri()
public byte[] payload()
public String payloadAsString()
public String contentType()
Copyright © 2015. All rights reserved.