B - The request body typepublic interface MutableHttpRequest<B> extends HttpRequest<B>, MutableHttpMessage<B>
HttpRequest that allows mutating headers, the body etc.| Modifier and Type | Method and Description | 
|---|---|
default MutableHttpRequest<B> | 
accept(MediaType... mediaTypes)
Sets the acceptable  
MediaType instances via the HttpHeaders.ACCEPT header. | 
default MutableHttpRequest<B> | 
basicAuth(CharSequence username,
         CharSequence password)
Set an  
HttpHeaders.AUTHORIZATION header, with value: "Basic Base64(username:password)". | 
default MutableHttpRequest<B> | 
bearerAuth(CharSequence token)
Set an  
HttpHeaders.AUTHORIZATION header, with value: "Bearer token". | 
MutableHttpRequest<B> | 
body(B body)
Sets the body. 
 | 
default MutableHttpRequest<B> | 
contentEncoding(CharSequence encoding)
Sets the content encoding. 
 | 
default MutableHttpRequest<B> | 
contentLength(long length)
Sets the content length. 
 | 
default MutableHttpRequest<B> | 
contentType(CharSequence contentType)
Set the response content type. 
 | 
default MutableHttpRequest<B> | 
contentType(MediaType mediaType)
Set the response content type. 
 | 
MutableHttpRequest<B> | 
cookie(Cookie cookie)
Sets the specified cookie on the request. 
 | 
MutableHttpHeaders | 
getHeaders()  | 
MutableHttpParameters | 
getParameters()  | 
default MutableHttpRequest<B> | 
header(CharSequence name,
      CharSequence value)
Set a response header. 
 | 
default MutableHttpRequest<B> | 
headers(Consumer<MutableHttpHeaders> headers)
Mutate the headers with the given consumer. 
 | 
default MutableHttpRequest<B> | 
headers(Map<CharSequence,CharSequence> namesAndValues)
Set multiple headers. 
 | 
MutableHttpRequest<B> | 
uri(URI uri)
Sets the uri on the request. 
 | 
create, DELETE, DELETE, DELETE, GET, GET, getCookies, getLocale, getMethod, getPath, getRemoteAddress, getServerAddress, getServerName, getUri, getUserPrincipal, getUserPrincipal, HEAD, HEAD, isSecure, OPTIONS, OPTIONS, PATCH, PATCH, POST, POST, PUT, PUT, setAttributegetAttributes, getBody, getBody, getBody, getCharacterEncoding, getContentLength, getContentTyperemoveAttributegetAttribute, getAttributeMutableHttpRequest<B> cookie(Cookie cookie)
cookie - the Cookie to return to the clientMutableHttpRequest<B> uri(URI uri)
uri - The uri to callMutableHttpRequest<B> body(B body)
MutableHttpMessagebody in interface MutableHttpMessage<B>body - The bodyMutableHttpHeaders getHeaders()
getHeaders in interface HttpMessage<B>getHeaders in interface MutableHttpMessage<B>HttpHeaders objectMutableHttpParameters getParameters()
getParameters in interface HttpRequest<B>default MutableHttpRequest<B> accept(MediaType... mediaTypes)
MediaType instances via the HttpHeaders.ACCEPT header.mediaTypes - The media typesdefault MutableHttpRequest<B> headers(Consumer<MutableHttpHeaders> headers)
MutableHttpMessageheaders in interface MutableHttpMessage<B>headers - The headersdefault MutableHttpRequest<B> header(CharSequence name, CharSequence value)
MutableHttpMessageheader in interface MutableHttpMessage<B>name - The name of the headervalue - The value of the headerdefault MutableHttpRequest<B> basicAuth(CharSequence username, CharSequence password)
MutableHttpMessageHttpHeaders.AUTHORIZATION header, with value: "Basic Base64(username:password)".basicAuth in interface MutableHttpMessage<B>username - The username part of the credentialspassword - The password part of the credentialsdefault MutableHttpRequest<B> bearerAuth(CharSequence token)
MutableHttpMessageHttpHeaders.AUTHORIZATION header, with value: "Bearer token".bearerAuth in interface MutableHttpMessage<B>token - The tokendefault MutableHttpRequest<B> headers(Map<CharSequence,CharSequence> namesAndValues)
MutableHttpMessageheaders in interface MutableHttpMessage<B>namesAndValues - The names and valuesdefault MutableHttpRequest<B> contentLength(long length)
MutableHttpMessagecontentLength in interface MutableHttpMessage<B>length - The lengthdefault MutableHttpRequest<B> contentType(CharSequence contentType)
MutableHttpMessagecontentType in interface MutableHttpMessage<B>contentType - The content typedefault MutableHttpRequest<B> contentType(MediaType mediaType)
MutableHttpMessagecontentType in interface MutableHttpMessage<B>mediaType - The media typedefault MutableHttpRequest<B> contentEncoding(CharSequence encoding)
MutableHttpMessagecontentEncoding in interface MutableHttpMessage<B>encoding - The encoding to use