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
ATTRScharsetThe value of charset part for Content-Type HTTP header.
closedconnectioncontentcontent_dispositioncontent_lengthThe value of Content-Length HTTP header.
content_typeThe value of content part for Content-Type HTTP header.
headershistoryA sequence of of responses, if redirects occurred.
hostlinksokReturns
Trueifstatusis less than400,Falseif not.raw_headersreal_urlreasonrequest_infostatusurlurl_objversion- json(*args, **kwargs) Any
Read and decodes JSON response.
- text(*args, **kwargs) str
Read response payload and decode.