You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Dário Nascimento <df...@gmail.com> on 2014/11/06 15:44:10 UTC
Send raw HTTP requests without parsing them
Hi,
I have various http requests in ByteBuffers. These requests are in text
format and ready to be sent by TCP. How can I use Apache HTTPClient library
to send these requests asynchronously without parsing them?
For sake of performance, I want to avoid to parse the requests text to
create a HTTPRequest instance and then use the apache library. On other
hand, these requests are processed by a JBoss Server, therefore a simple
TCP connection is not enough since I need to manage the connection state.
In addiction, the requests must be processed asynchronously.
Best regards
Dário
Re: Send raw HTTP requests without parsing them
Posted by Oleg Kalnichevski <ol...@apache.org>.
On Thu, 2014-11-06 at 15:44 +0100, Dário Nascimento wrote:
> Hi,
>
> I have various http requests in ByteBuffers. These requests are in text
> format and ready to be sent by TCP. How can I use Apache HTTPClient library
> to send these requests asynchronously without parsing them?
>
>
> For sake of performance, I want to avoid to parse the requests text to
> create a HTTPRequest instance and then use the apache library. On other
> hand, these requests are processed by a JBoss Server, therefore a simple
> TCP connection is not enough since I need to manage the connection state.
> In addiction, the requests must be processed asynchronously.
>
> Best regards
>
> Dário
Dário
HttpClient also needs to be able to access some of the request
properties in order to correctly complete the message exchange. What you
you are describing cannot be done with HttpClient. You might be able to
implement a custom HTTP client based on HttpCore that meets your
requirements. At the very least you should be able to re-use some of the
response processing code from the library.
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org