7 #include "fwNetworkIO/http/Request.hpp" 28 return std::make_shared<Request>(url);
35 m_headers[key] = value;
static FWNETWORKIO_API Request::sptr New(const std::string &url)
Creates a new Request with given url.
FWNETWORKIO_API const HeadersType & getHeaders() const
headers getter.
The namespace fwNetworkIO contains the primary methods to access network.
FWNETWORKIO_API void setHeaders(const HeadersType &headers)
headers setter.
FWNETWORKIO_API void setUrl(const std::string &url)
set current url
FWNETWORKIO_API void addHeader(const std::string &key, const std::string &value)
add element in the request header
FWNETWORKIO_API const std::string & getUrl() const
return current url
std::map< std::string, std::string > HeadersType
Maps header name to its value.
FWNETWORKIO_API Request()
Construct a new Request with given url.