Skip to content

Instantly share code, notes, and snippets.

@povilasb
Created September 21, 2015 05:47
Show Gist options
  • Save povilasb/46ff551e3510b3ca631f to your computer and use it in GitHub Desktop.
Save povilasb/46ff551e3510b3ca631f to your computer and use it in GitHub Desktop.
Create proxy authorization header
#include <string>
#include "base64.h"
std::string
http_make_proxy_basic_auth_header(const std::string& username,
const std::string& password)
{
return "Proxy-Authorization: Basic " + base64_encode(username, password);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment