parse_http_resp package

Submodules

parse_http_resp.parse_http_resp module

parse_http_resp.parse_http_resp.parse_http_response(respbytes, logger=<Logger rddr.parse_http_resp (WARNING)>)

Massages an HTTP response prior to parsing. Uncompresses content if compressed with gzip. Removes Date header field. If compressed, also removes Content-Length field. Returns the entire HTTP response, both status, headers, and content, as a bytestring.

Parameters
  • respbytes (bytes) – The HTTP response directly from the server.

  • logger (Logger) – Logger for printing messages.

Return type

bytes

Module contents