Class ApacheHttpClientHttpConnection
java.lang.Object
org.davidmoten.oa3.codegen.http.service.internal.ApacheHttpClientHttpConnection
- All Implemented Interfaces:
HttpConnection
-
Constructor Summary
ConstructorsConstructorDescriptionApacheHttpClientHttpConnection(org.apache.hc.client5.http.classic.methods.HttpUriRequestBase request) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidvoidoutput(Consumer<? super OutputStream> consumer, String contentType, Optional<String> contentEncoding, boolean chunked) When a consumer is defined (when this method is called), this class is expected to set the Content-Type and Content-Length fields (and support chunking if requested).response()voidsetConnectTimeoutMs(long connectTimeoutMs) voidsetReadTimeoutMs(long readTimeoutMs)
-
Constructor Details
-
ApacheHttpClientHttpConnection
public ApacheHttpClientHttpConnection(org.apache.hc.client5.http.classic.methods.HttpUriRequestBase request)
-
-
Method Details
-
header
- Specified by:
headerin interfaceHttpConnection
-
setConnectTimeoutMs
public void setConnectTimeoutMs(long connectTimeoutMs) - Specified by:
setConnectTimeoutMsin interfaceHttpConnection
-
setReadTimeoutMs
public void setReadTimeoutMs(long readTimeoutMs) - Specified by:
setReadTimeoutMsin interfaceHttpConnection
-
output
public void output(Consumer<? super OutputStream> consumer, String contentType, Optional<String> contentEncoding, boolean chunked) Description copied from interface:HttpConnectionWhen a consumer is defined (when this method is called), this class is expected to set the Content-Type and Content-Length fields (and support chunking if requested).- Specified by:
outputin interfaceHttpConnection- Parameters:
consumer- action to be performed on the OutputStreamcontentType- Content-Type header valuecontentEncoding- if present is appended to the Content-Type value
-
response
- Specified by:
responsein interfaceHttpConnection- Throws:
IOException
-
close
- Specified by:
closein interfaceHttpConnection- Throws:
IOException
-