userver: testsuite.daemons.service_client.BaseAiohttpClient Class Reference
Loading...
Searching...
No Matches
testsuite.daemons.service_client.BaseAiohttpClient Class Reference

Detailed Description

Definition at line 22 of file service_client.py.

Inheritance diagram for testsuite.daemons.service_client.BaseAiohttpClient:

Public Member Functions

 __init__ (self, str base_url, *, aiohttp.ClientSession session, ssl.SSLContext|None ssl_context=None, str|None span_id_header=None, dict[str, str]|None headers=None, float timeout=DEFAULT_TIMEOUT)
 :param base_url: Base client url :param session: aiohttp.ClientSession instance :param headers: default request headers dictionary :param timeout: http client default timeout
 url (self, str|yarl.URL path)

Protected Member Functions

aiohttp.ClientResponse _aiohttp_request (self, str http_method, str|yarl.URL path, dict[str, str]|None headers=None, str|None bearer=None, str|None x_real_ip=None, **kwargs)
dict[str, str] _build_headers (self, dict[str, str]|None user_headers=None, str|None bearer=None, str|None x_real_ip=None)

Protected Attributes

 _base_url = url_util.ensure_trailing_separator(base_url)
 _headers = headers or {}
 _timeout = timeout
 _session = session
 _ssl_context = ssl_context
 _span_id_header = span_id_header

Constructor & Destructor Documentation

◆ __init__()

testsuite.daemons.service_client.BaseAiohttpClient.__init__ ( self,
str base_url,
* ,
aiohttp.ClientSession session,
ssl.SSLContext | None ssl_context = None,
str | None span_id_header = None,
dict[str, str] | None headers = None,
float timeout = DEFAULT_TIMEOUT )

:param base_url: Base client url :param session: aiohttp.ClientSession instance :param headers: default request headers dictionary :param timeout: http client default timeout

Definition at line 23 of file service_client.py.

Member Function Documentation

◆ _aiohttp_request()

aiohttp.ClientResponse testsuite.daemons.service_client.BaseAiohttpClient._aiohttp_request ( self,
str http_method,
str | yarl.URL path,
dict[str, str] | None headers = None,
str | None bearer = None,
str | None x_real_ip = None,
** kwargs )
protected

Definition at line 51 of file service_client.py.

◆ _build_headers()

dict[str, str] testsuite.daemons.service_client.BaseAiohttpClient._build_headers ( self,
dict[str, str] | None user_headers = None,
str | None bearer = None,
str | None x_real_ip = None )
protected

Definition at line 80 of file service_client.py.

◆ url()

testsuite.daemons.service_client.BaseAiohttpClient.url ( self,
str | yarl.URL path )

Definition at line 46 of file service_client.py.

Member Data Documentation

◆ _base_url

testsuite.daemons.service_client.BaseAiohttpClient._base_url = url_util.ensure_trailing_separator(base_url)
protected

Definition at line 39 of file service_client.py.

◆ _headers

testsuite.daemons.service_client.BaseAiohttpClient._headers = headers or {}
protected

Definition at line 40 of file service_client.py.

◆ _session

testsuite.daemons.service_client.BaseAiohttpClient._session = session
protected

Definition at line 42 of file service_client.py.

◆ _span_id_header

testsuite.daemons.service_client.BaseAiohttpClient._span_id_header = span_id_header
protected

Definition at line 44 of file service_client.py.

◆ _ssl_context

testsuite.daemons.service_client.BaseAiohttpClient._ssl_context = ssl_context
protected

Definition at line 43 of file service_client.py.

◆ _timeout

testsuite.daemons.service_client.BaseAiohttpClient._timeout = timeout
protected

Definition at line 41 of file service_client.py.


The documentation for this class was generated from the following file: