Make get request to some path with url params :param path: url where make request to :param params: url params as dict what would be used to make request :param decode: whenever to decode response as json :return: Response object, dict with decoded content or None :rtype: tuple[Response, dict | bytes]
Source code in marketplace_apis/common/requester.py
Python |
---|
107
108
109
110
111
112
113
114
115
116
117
118 | async def get(
self, path: str, params: dict[str, str] | None = None, decode: bool = True
) -> tuple[httpx.Response, dict | bytes]:
"""
Make get request to some path with url params
:param path: url where make request to
:param params: url params as dict what would be used to make request
:param decode: whenever to decode response as json
:return: Response object, dict with decoded content or None
:rtype: tuple[Response, dict | bytes]
"""
return await self._make_request("get", path, params, decode=decode)
|