Class DefaultHttpRequestWriter<T extends HttpRequest>
java.lang.Object
org.apache.hc.core5.http.impl.nio.AbstractMessageWriter<T>
org.apache.hc.core5.http.impl.nio.DefaultHttpRequestWriter<T>
- Type Parameters:
T- The type ofHttpRequest.
- All Implemented Interfaces:
NHttpMessageWriter<T>
Default
NHttpMessageWriter implementation for HttpRequests.- Since:
- 4.1
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultHttpRequestWriter(Http1Config http1Config, LineFormatter formatter) DefaultHttpRequestWriter(LineFormatter formatter) Creates an instance of DefaultHttpRequestWriter. -
Method Summary
Modifier and TypeMethodDescriptionprotected HttpVersionprotocolVersion(T request) Determines the HTTP protocol version to be communicated to the opposite endpoint in the message header.protected voidwriteHeadLine(T message, CharArrayBuffer lineBuf) Writes out the first line ofHttpMessage.Methods inherited from class AbstractMessageWriter
getLineFormatter, reset, write
-
Field Details
-
http1Config
-
-
Constructor Details
-
DefaultHttpRequestWriter
- Since:
- 5.3
-
DefaultHttpRequestWriter
Creates an instance of DefaultHttpRequestWriter.- Parameters:
formatter- the line formatter IfnullBasicLineFormatter.INSTANCEwill be used.- Since:
- 4.3
-
DefaultHttpRequestWriter
public DefaultHttpRequestWriter()- Since:
- 4.3
-
-
Method Details
-
protocolVersion
Determines the HTTP protocol version to be communicated to the opposite endpoint in the message header.- Since:
- 5.3
-
writeHeadLine
Description copied from class:AbstractMessageWriterWrites out the first line ofHttpMessage.- Specified by:
writeHeadLinein classAbstractMessageWriter<T extends HttpRequest>- Parameters:
message- HTTP message.- Throws:
IOException- in case of an I/O error.
-