use of org.apache.hc.core5.http.nio.support.BasicRequestProducer in project spring-framework by spring-projects.
the class HttpComponentsClientHttpRequest method toRequestProducer.
public AsyncRequestProducer toRequestProducer() {
ReactiveEntityProducer reactiveEntityProducer = null;
if (this.byteBufferFlux != null) {
String contentEncoding = getHeaders().getFirst(HttpHeaders.CONTENT_ENCODING);
ContentType contentType = null;
if (getHeaders().getContentType() != null) {
contentType = ContentType.parse(getHeaders().getContentType().toString());
}
reactiveEntityProducer = new ReactiveEntityProducer(this.byteBufferFlux, this.contentLength, contentType, contentEncoding);
}
return new BasicRequestProducer(this.httpRequest, reactiveEntityProducer);
}
Aggregations