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 Christophe Darville <cd...@internetvista.com> on 2022/02/11 08:28:17 UTC

Post Multipart request using CloseableHttpAsyncClient (HC5)

Hi,

Do you have some sample code or some hints on how to post a multipart request through an async client in httpClient 5 ? 

Javadoc about SimpleHttpRequest says  "It is generally recommended to use AsyncRequestBuilder and streaming AsyncEntityProducers.” but I cannot find traces of those classes in javadoc. 

Any help would be appreciated.

Regards,
Christophe
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: Post Multipart request using CloseableHttpAsyncClient (HC5)

Posted by Christophe Darville <cd...@internetvista.com>.
Ok, so today it is not possible to upload a file through a CloseableHttpAsyncClient or I missed something ?

> On 11 Feb 2022, at 18:50, Oleg Kalnichevski <ol...@apache.org> wrote:
> 
> 
> 
> On 2/11/2022 9:28 AM, Christophe Darville wrote:
>> Hi,
>> Do you have some sample code or some hints on how to post a multipart request through an async client in httpClient 5 ?
>> Javadoc about SimpleHttpRequest says  "It is generally recommended to use AsyncRequestBuilder and streaming AsyncEntityProducers.” but I cannot find traces of those classes in javadoc.
>> Any help would be appreciated.
> 
> As soon as someone contributes support for non-blocking multipart entity producers to the project there will be traces of those classes in javadocs.
> 
> Oleg
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: Setting IOSessionListener on an HttpAsyncClientBuilder

Posted by Gary Gregory <ga...@gmail.com>.
A test would be nice ;-)

Gary

On Fri, Feb 18, 2022, 05:35 Christophe Darville <cd...@internetvista.com>
wrote:

> Hi Oleh,
>
> I have created a PR at Github with this feature. I hope I did it the right
> way.
>
> Regards,
> Christophe
>
> > On 17 Feb 2022, at 12:19, Oleg Kalnichevski <ol...@apache.org> wrote:
> >
> > On Thu, 2022-02-17 at 10:48 +0100, Christophe Darville wrote:
> >> Hi,
> >>
> >> It would be a nice feature to be able to set an IOSessionListener on
> >> an HttpAsyncClientBuilder in the same way we can set an
> >> IOReactorConfig. This IOSessionListener would be passed in the
> >> constructor of DefaultConnectingIOReactor like the IOReactorConfig
> >> (currently set to null).
> >>
> >> Regards,
> >> Christophe
> >>
> >>
> >
> > Christophe,
> >
> > Feel free to raise a change request JIRA for this feature or, better
> > yet, contribute it as a PR at GitHub.
> >
> > Oleg
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> > For additional commands, e-mail: httpclient-users-help@hc.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>
>

Re: Setting IOSessionListener on an HttpAsyncClientBuilder

Posted by Christophe Darville <cd...@internetvista.com>.
Hi Oleh,

I have created a PR at Github with this feature. I hope I did it the right way.

Regards,
Christophe

> On 17 Feb 2022, at 12:19, Oleg Kalnichevski <ol...@apache.org> wrote:
> 
> On Thu, 2022-02-17 at 10:48 +0100, Christophe Darville wrote:
>> Hi,
>> 
>> It would be a nice feature to be able to set an IOSessionListener on
>> an HttpAsyncClientBuilder in the same way we can set an
>> IOReactorConfig. This IOSessionListener would be passed in the
>> constructor of DefaultConnectingIOReactor like the IOReactorConfig
>> (currently set to null). 
>> 
>> Regards,
>> Christophe 
>> 
>> 
> 
> Christophe,
> 
> Feel free to raise a change request JIRA for this feature or, better
> yet, contribute it as a PR at GitHub.
> 
> Oleg
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: Setting IOSessionListener on an HttpAsyncClientBuilder

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Thu, 2022-02-17 at 10:48 +0100, Christophe Darville wrote:
> Hi,
> 
> It would be a nice feature to be able to set an IOSessionListener on
> an HttpAsyncClientBuilder in the same way we can set an
> IOReactorConfig. This IOSessionListener would be passed in the
> constructor of DefaultConnectingIOReactor like the IOReactorConfig
> (currently set to null). 
> 
> Regards,
> Christophe 
> 
> 

Christophe,

Feel free to raise a change request JIRA for this feature or, better
yet, contribute it as a PR at GitHub.

Oleg



---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Setting IOSessionListener on an HttpAsyncClientBuilder

Posted by Christophe Darville <cd...@internetvista.com>.
Hi,

It would be a nice feature to be able to set an IOSessionListener on an HttpAsyncClientBuilder in the same way we can set an IOReactorConfig. This IOSessionListener would be passed in the constructor of DefaultConnectingIOReactor like the IOReactorConfig (currently set to null). 

Regards,
Christophe 



---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: Post Multipart request using CloseableHttpAsyncClient (HC5)

Posted by Oleg Kalnichevski <ol...@apache.org>.

On 2/11/2022 9:28 AM, Christophe Darville wrote:
> Hi,
> 
> Do you have some sample code or some hints on how to post a multipart request through an async client in httpClient 5 ?
> 
> Javadoc about SimpleHttpRequest says  "It is generally recommended to use AsyncRequestBuilder and streaming AsyncEntityProducers.” but I cannot find traces of those classes in javadoc.
> 
> Any help would be appreciated.
> 

As soon as someone contributes support for non-blocking multipart entity 
producers to the project there will be traces of those classes in javadocs.

Oleg

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org