http_client missing method?

Apr 25, 2013 at 8:18 PM
is it possible for http_client to get assigned a different URI after declaration?

It appears the only way to declare this class is through either the constructor or through std::move from another http_client.
http_client original(m_uri);
http_client new_client = std::move(original);
it seems that for RESTful service request going to different URI is very common and declaring a new http_client each time seems to be a waste.
Apr 26, 2013 at 2:24 PM

The intent behind the design was that each client should represent a particular service, which is why you don't change the base URI after it's been constructed. The instances aren't that expensive to create and destroy -- if your connections are short-lived, you should feel comfortable creating and destroying clients at will.