public final class HttpRequestBuilder extends HttpMessageBuilder<HttpRequestBuilder,HttpRequest>
HttpRequests. Instances can only be obtained using HttpRequest.builder(). At the very least, the
request URI needs to be provided via setUri(String). By default, GET is used as method with empty headers, query
params and entity.entity, headers| Modifier and Type | Method and Description |
|---|---|
HttpRequest |
build() |
HttpRequestBuilder |
setHeaders(ParameterMap headersMap) |
HttpRequestBuilder |
setMethod(HttpConstants.Method method) |
HttpRequestBuilder |
setMethod(String method)
Allows for using extension methods, as defined in the rfc.
|
HttpRequestBuilder |
setQueryParams(ParameterMap queryParams) |
HttpRequestBuilder |
setUri(String uri)
Declares the URI where this
HttpRequest will be sent. |
addHeader, getHeaderValue, getHeaderValues, removeHeader, setEntitypublic HttpRequestBuilder setUri(String uri)
HttpRequest will be sent. Minimum required configuration.uri - the URI of the HttpRequest desired. Non null.public HttpRequestBuilder setMethod(String method)
#setMethod(Method) should be used.method - the HTTP method of the HttpRequest desired. Non null.public HttpRequestBuilder setMethod(HttpConstants.Method method)
method - the HTTP method of the HttpRequest desired. Non null.public HttpRequestBuilder setHeaders(ParameterMap headersMap)
headersMap - a ParameterMap representing the HTTP headers of the HttpRequest desired. Non null.public HttpRequestBuilder setQueryParams(ParameterMap queryParams)
queryParams - a ParameterMap representing the HTTP query params of the HttpRequest desired. Non null.public HttpRequest build()
build in class HttpMessageBuilder<HttpRequestBuilder,HttpRequest>HttpRequest as describedCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.