MCPcopy
hub / github.com/httpie/cli / make_header

Method make_header

httpie/plugins/builtin.py:31–34  ·  view source on GitHub ↗
(username: str, password: str)

Source from the content-addressed store, hash-verified

29
30 @staticmethod
31 def make_header(username: str, password: str) -> str:
32 credentials = f'{username}:{password}'
33 token = b64encode(credentials.encode()).strip().decode('latin1')
34 return f'Basic {token}'
35
36
37class HTTPBearerAuth(requests.auth.AuthBase):

Callers 2

__call__Method · 0.80
test_session_unicodeMethod · 0.80

Calls 1

decodeMethod · 0.80

Tested by 1

test_session_unicodeMethod · 0.64