pybotters.SyncClientResponse
- class pybotters.SyncClientResponse(method: str, url: yarl.URL, *, writer: asyncio.Task[None], continue100: Optional[asyncio.Future[bool]], timer: aiohttp.helpers.BaseTimerContext, request_info: aiohttp.client_reqrep.RequestInfo, traces: List[Trace], loop: asyncio.events.AbstractEventLoop, session: ClientSession)
Methods
__init__
(method, url, *, writer, ...)close
()get_encoding
()json
(*args, **kwargs)Read and decodes JSON response.
raise_for_status
()read
()Read response payload.
release
()start
(connection)Start response processing.
text
(*args, **kwargs)Read response payload and decode.
wait_for_close
()Attributes
ATTRS
charset
The value of charset part for Content-Type HTTP header.
closed
connection
content
content_disposition
content_length
The value of Content-Length HTTP header.
content_type
The value of content part for Content-Type HTTP header.
headers
history
A sequence of of responses, if redirects occurred.
host
links
ok
Returns
True
ifstatus
is less than400
,False
if not.raw_headers
real_url
reason
request_info
status
url
url_obj
version
- json(*args, **kwargs) Any
Read and decodes JSON response.
- text(*args, **kwargs) str
Read response payload and decode.