HTTP Request Data
Data Object that represents a request that can be executed by an HTTP Component. The request specifies the method, path, headers, cookies, and an optional body (and associated content type). This request is combined with the HTTP Resource info that is configured on the HTTP Component to generate the full URL to be requested.
Class name: com.datashyft.pipeline.dataobjects.HTTPRequest
HTTPRequestBuiler.create() — Creates a builder object that is used build HTTP Request objects. It has setter methods for each of the HTTP Request object’s attributes. See the full documentation of the HTTP Request Builder below.
getBody() — Returns the body to be sent with the request.
getContentType() — Returns the Content Type of the body.
getCookies() — Returns a Map containing the cookies to be sent with the request
getHeaders() — Returns a Map containing the headers to be sent with the request.
getMethod()— Returns the HTTP Method contained in this object.
getPath() — Returns the Request Path for this object.
shouldFollowRedirects() — Returns a flag indicating whether the HTTP Component should follow any redirects returned by the server.
This class also includes a Request Builder class that can be used to more easily construct an HTTP Request Object.
Class name: com.datashyft.pipeline.dataobjects.HTTPRequest.HTTPRequestBuilder
get() — Sets the HTTP method of this request to GET.
post() — Sets the HTTP method of this request to POST.
put() — Sets the HTTP method of this request to PUT.
delete() — Sets the HTTP method of this request to DELETE.
setMethod(String method) — Sets the HTTP method of this request to the specified method.
setPath(String path) — Sets the path of the HTTP Request.
setBody(ByteBuffer body) — Sets the body of the HTTP Request.
setBody(MultiByteBuffer body) — Sets the body of the HTTP Request.
setContentType(String contentType) — Sets the Content Type header of the HTTP Request.
setShouldFollowRedirects(boolean shouldFollow) — Configures whether the HTTP Request should follow redirect responses from the server or not.
addHeader(String headerName, String headerValue) — Adds an HTTP Header to the HTTP Request object.
addHeaders(Map<String, String> headers) — Adds multiple HTTP Headers of the HTTP Request object. These headers are added to the existing set of headers.
addCookie(String cookieName, String cookieValue) — Adds a cookie value to the set of cookies sent to the server with the HTTP Request.
addCookies(Map<String, String> cookies) — Adds multiple cookie values to the set of cookies sent to the server with the HTTP Request. These cookies are added to the existing set of cookies.
addTags(Map<String, Dequeue> tags) — Adds the set of Tags to the HTTP Request object.
build()— Constructs the HTTP Request object that has been configured using the builder.