Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
adapters.py14 linesDownload Raw Back to httpie
1from httpie.cli.dicts import HTTPHeadersDict2from requests.adapters import HTTPAdapter3 4 5class HTTPieHTTPAdapter(HTTPAdapter):6 7    def build_response(self, req, resp):8        """Wrap the original headers with the `HTTPHeadersDict`9        to preserve multiple headers that have the same name"""10 11        response = super().build_response(req, resp)12        response.headers = HTTPHeadersDict(getattr(resp, 'headers', {}))13        return response14 
codekingpro/portable-devtools · Team Ai