public static final class RequestContent.Builder extends Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
RequestContent.Builder |
addDate(Calendar calendar)
IMPORTANT: If you call this overload instead of
addHeader(String, String) , be sure to retrieve the
generated header value to add to your client request using a subsequent call to RequestContent.getDate() . |
RequestContent.Builder |
addDate(Date dateGMT)
IMPORTANT: If you call this overload instead of
addHeader(String, String) , be sure to retrieve the
generated header value to add to your client request using a subsequent call to RequestContent.getDate() . |
RequestContent.Builder |
addDateNow()
IMPORTANT: If you call this overload instead of
addHeader(String, String) , be sure to retrieve the
generated header value to add to your client request using a subsequent call to RequestContent.getDate() . |
RequestContent.Builder |
addHeader(String name,
String value)
Adds a header name and value pair
|
RequestContent |
build() |
RequestContent.Builder |
setRequestLine(String requestLine)
Deprecated.
|
RequestContent.Builder |
setRequestTarget(String method,
String path) |
@Deprecated public RequestContent.Builder setRequestLine(String requestLine)
public RequestContent.Builder setRequestTarget(String method, String path)
public RequestContent.Builder addHeader(String name, String value)
name
- header namevalue
- header valuepublic RequestContent.Builder addDate(Calendar calendar)
addHeader(String, String)
, be sure to retrieve the
generated header value to add to your client request using a subsequent call to RequestContent.getDate()
. This is
merely a convenience method to generate a date header in the correct format.calendar
- the Calendar to providepublic RequestContent.Builder addDate(Date dateGMT)
addHeader(String, String)
, be sure to retrieve the
generated header value to add to your client request using a subsequent call to RequestContent.getDate()
. This is
merely a convenience method to generate a date header in the correct format.dateGMT
- the current date in GMTRequestContent.Builder
public RequestContent.Builder addDateNow()
addHeader(String, String)
, be sure to retrieve the
generated header value to add to your client request using a subsequent call to RequestContent.getDate()
. This is
merely a convenience method to generate a date header in the correct format.RequestContent.Builder
public RequestContent build()
Copyright © 2013-2017. All Rights Reserved.