Hi UdayJ,
The problem is the http_headers::add(...) method works by using the stream operator << on an ostringstream_t (see the function print_string in asyncrt_utils.h at line 151). Which on Windows means it works with a 2 byte character UTF-16 string. In the future we might look at making a few places like this also work with UTF-8 strings on Windows.
To work around simply convert you std::string to a string_t with:
Steve
The problem is the http_headers::add(...) method works by using the stream operator << on an ostringstream_t (see the function print_string in asyncrt_utils.h at line 151). Which on Windows means it works with a 2 byte character UTF-16 string. In the future we might look at making a few places like this also work with UTF-8 strings on Windows.
To work around simply convert you std::string to a string_t with:
request.headers().add(header_names::authorization, ::utility::conversions::to_string_t(auth));
Thanks,Steve