Overview
Features
Download
Documentation
Community
Add-Ons & Services

Async HTTP client

Please post support and help requests here.

Async HTTP client

Postby liortal » 27 Feb 2014, 11:13

Hi,

I'm trying to evaluate whether POCO fits our requirements.

We're building a new project and we need a cross-platform HTTP client (communicating with a REST API).

I'm wondering about the support for async operations (non-blocking HTTP calls) -- are they currently supported in the framework?

If not, is there any recommended (and simple) solution for this requirement?

Thanks
liortal
 
Posts: 2
Joined: 27 Feb 2014, 11:09

Re: Async HTTP client

Postby alex » 01 Mar 2014, 06:36

liortal wrote:I'm wondering about the support for async operations (non-blocking HTTP calls) -- are they currently supported in the framework?

Not out-of-the-box.

liortal wrote:If not, is there any recommended (and simple) solution for this requirement?

If you don't mind threads, look at Poco::ActiveMethod.
alex
 
Posts: 1087
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: Async HTTP client

Postby liortal » 01 Mar 2014, 17:21

Thanks.

Do you know if it's possible to mix it together with std::async for example?
liortal
 
Posts: 2
Joined: 27 Feb 2014, 11:09

Re: Async HTTP client

Postby alex » 02 Mar 2014, 05:54

liortal wrote:Do you know if it's possible to mix it together with std::async for example?

I don't know what exactly do you mean by "mix", but I see no reason why you couldn't use std::async for asynchronous behavior. Active method is similar to it and, if you call std::async with std::launch::async policy, in the background they will likely be doing the same thing - executing in another thread.
alex
 
Posts: 1087
Joined: 11 Jul 2006, 16:27
Location: United_States


Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron