Package org.elasticsearch.http
Interface HttpRequest
- All Superinterfaces:
HttpPreRequest
- All Known Implementing Classes:
HttpPipelinedRequest
A basic http request abstraction. Http modules needs to implement this interface to integrate with the
server package's rest handling. This interface exposes the request's content as well as methods to be used
to generate a response.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptioncontent()
createResponse
(RestStatus status, BytesReference content) Create an http response from this request and the supplied status and content.void
release()
Release any resources associated with this request.If this instances uses any pooled resources, creates a copy of this instance that does not use any pooled resources and releases any resources associated with this instance.removeHeader
(String header) Methods inherited from interface org.elasticsearch.http.HttpPreRequest
getHeaders, header, method, uri
-
Method Details
-
content
BytesReference content() -
strictCookies
-
protocolVersion
HttpRequest.HttpVersion protocolVersion() -
removeHeader
-
createResponse
Create an http response from this request and the supplied status and content. -
getInboundException
-
release
void release()Release any resources associated with this request. Implementations should be idempotent. The behavior ofcontent()
after this method has been invoked is undefined and implementation specific. -
releaseAndCopy
HttpRequest releaseAndCopy()If this instances uses any pooled resources, creates a copy of this instance that does not use any pooled resources and releases any resources associated with this instance. If the instance does not use any shared resources, returns itself.- Returns:
- a safe unpooled http request
-