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 uri(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() |
String |
getMethod() |
org.mule.runtime.api.util.MultiMap<String,String> |
getQueryParams() |
String |
getUri() |
HttpRequestBuilder |
method(HttpConstants.Method method) |
HttpRequestBuilder |
method(String method)
Allows for using extension methods, as defined in the rfc.
|
HttpRequestBuilder |
queryParams(org.mule.runtime.api.util.MultiMap<String,String> queryParams) |
HttpRequestBuilder |
uri(String uri)
Declares the URI where this
HttpRequest will be sent. |
addHeader, entity, getHeaders, getHeaderValue, getHeaderValues, headers, removeHeaderpublic HttpRequestBuilder uri(String uri)
HttpRequest will be sent. Minimum required configuration.uri - the URI of the HttpRequest desired. Non null.public HttpRequestBuilder method(String method)
#method(Method) should be used.method - the HTTP method of the HttpRequest desired. Non null.public HttpRequestBuilder method(HttpConstants.Method method)
method - the HTTP method of the HttpRequest desired. Non null.public HttpRequestBuilder queryParams(org.mule.runtime.api.util.MultiMap<String,String> queryParams)
queryParams - a MultiMap representing the HTTP query params of the HttpRequest desired. Non null.public String getUri()
public String getMethod()
public org.mule.runtime.api.util.MultiMap<String,String> getQueryParams()
public HttpRequest build()
build in class HttpMessageBuilder<HttpRequestBuilder,HttpRequest>HttpRequest as describedCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.