grab.base_transport — Grab 0.6.41 documentation

# `grab.base_transport`

## Module Contents

### Classes

`BaseTransport` |

class grab.base_transport.BaseTransport
  abstract reset() → None
  abstract prepare_response(req: grab.request.Request, *, document_class: type[grab.document.Document] = Document) → grab.document.Document
  abstract wrap_transport_error() → collections.abc.Generator[None, None, None]
  abstract request(req: grab.request.Request, cookiejar: http.cookiejar.CookieJar) → None
  setup_body_file(storage_dir: str, storage_filename: None | str, create_dir: bool = False) → str
  detect_request_method(grab_config: collections.abc.Mapping[str, Any]) → str

    Analyze request config and find which request method will be used.

    Returns request method in upper case