urdl icon indicating copy to clipboard operation
urdl copied to clipboard

Add request_headers option

Open maskit opened this issue 9 years ago • 0 comments

This PR adds request_headers option, which allow users to send arbitrary HTTP headers. The option can override all HTTP headers generated by other options or urdl core, such as "Host", "Content-Length" or "User-Agent".

Usage:

std::map<std::string, std::string> headers = {
  {"X-Foo", "bar"}
};
is.set_option(urdl::http::request_headers(headers));

This would satisfy Issue #1 .

maskit avatar Aug 02 '16 08:08 maskit