Modifier and Type | Method and Description |
---|---|
Request.Builder |
body(byte[] body)
Sets the request body.
|
Request |
build() |
Request.Builder |
encoding(Charset encoding)
Sets the request encoding.
|
Request.Builder |
header(String name,
String value)
Adds a request header to the constructed request instance.
|
Request.Builder |
headers(KeyValues headers)
Sets the request headers (all previously defined headers will be lost).
|
Request.Builder |
method(String method)
Sets the request method.
|
Request.Builder |
requestURI(URI requestURI)
Sets the request URI.
|
public Request.Builder method(String method)
build()
.method
- request methodpublic Request.Builder requestURI(URI requestURI)
build()
.requestURI
- request URIpublic Request.Builder body(byte[] body)
body
- request body (cannot be null
)public Request.Builder headers(KeyValues headers)
headers
- request headers (cannot be null
)public Request.Builder header(String name, String value)
name
- header name (cannot be empty)value
- header value (cannot be null
)public Request.Builder encoding(Charset encoding)
null
value will be used signalizing no encoding was set
in the incoming request (using the Content-Type
header)encoding
- request encoding (can be null
)Copyright © 2016. All Rights Reserved.