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

Method __call__

httpie/plugins/builtin.py:15–28  ·  view source on GitHub ↗

Override username/password serialization to allow unicode. See https://github.com/httpie/cli/issues/212

(
        self,
        request: requests.PreparedRequest
    )

Source from the content-addressed store, hash-verified

13class HTTPBasicAuth(requests.auth.HTTPBasicAuth):
14
15 def __call__(
16 self,
17 request: requests.PreparedRequest
18 ) -> requests.PreparedRequest:
19 """
20 Override username/password serialization to allow unicode.
21
22 See https://github.com/httpie/cli/issues/212
23
24 """
25 # noinspection PyTypeChecker
26 request.headers['Authorization'] = type(self).make_header(
27 self.username, self.password).encode('latin1')
28 return request
29
30 @staticmethod
31 def make_header(username: str, password: str) -> str:

Callers

nothing calls this directly

Calls 1

make_headerMethod · 0.80

Tested by

no test coverage detected