Mercurial > repos > jpayne > bioproject_to_srr_2
annotate urllib3/contrib/emscripten/request.py @ 12:fc77995bc4da
planemo upload for repository https://toolrepo.galaxytrakr.org/view/jpayne/bioproject_to_srr_2/556cac4fb538
author | jpayne |
---|---|
date | Wed, 08 May 2024 00:32:13 -0400 |
parents | 5eb2d5e3bf22 |
children |
rev | line source |
---|---|
jpayne@7 | 1 from __future__ import annotations |
jpayne@7 | 2 |
jpayne@7 | 3 from dataclasses import dataclass, field |
jpayne@7 | 4 |
jpayne@7 | 5 from ..._base_connection import _TYPE_BODY |
jpayne@7 | 6 |
jpayne@7 | 7 |
jpayne@7 | 8 @dataclass |
jpayne@7 | 9 class EmscriptenRequest: |
jpayne@7 | 10 method: str |
jpayne@7 | 11 url: str |
jpayne@7 | 12 params: dict[str, str] | None = None |
jpayne@7 | 13 body: _TYPE_BODY | None = None |
jpayne@7 | 14 headers: dict[str, str] = field(default_factory=dict) |
jpayne@7 | 15 timeout: float = 0 |
jpayne@7 | 16 decode_content: bool = True |
jpayne@7 | 17 |
jpayne@7 | 18 def set_header(self, name: str, value: str) -> None: |
jpayne@7 | 19 self.headers[name.capitalize()] = value |
jpayne@7 | 20 |
jpayne@7 | 21 def set_body(self, body: _TYPE_BODY | None) -> None: |
jpayne@7 | 22 self.body = body |