示例#1
0
static void set_content_type_if_not_present(http::http_headers &headers, utility::string_t content_type)
{
    utility::string_t temp;
    if(!headers.match(http::header_names::content_type, temp))
    {
        headers.add(http::header_names::content_type, std::move(content_type));
    }
}
示例#2
0
	// Free floating utility functions:
	void RealSteamDataConnection::SetSteamAPIHeaders(http::http_headers & headers)
	{
		headers.add(L"User-Agent", L"Steam 1291812 / iPhone");
		headers.add(L"Content-Type", L"application/x-www-form-urlencoded");
	}