MCPcopy Create free account
hub / github.com/ChiyukiGana/Quickinput / make_basic_authentication_header

Function make_basic_authentication_header

source/src/httplib/httplib.h:9732–9738  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9730}
9731
9732inline std::pair<std::string, std::string>
9733make_basic_authentication_header(const std::string &username,
9734 const std::string &password, bool is_proxy) {
9735 auto field = "Basic " + detail::base64_encode(username + ":" + password);
9736 auto key = is_proxy ? "Proxy-Authorization" : "Authorization";
9737 return std::make_pair(key, std::move(field));
9738}
9739
9740inline std::pair<std::string, std::string>
9741make_bearer_token_authentication_header(const std::string &token,

Callers 1

write_requestMethod · 0.85

Calls 1

base64_encodeFunction · 0.85

Tested by

no test coverage detected