MCPcopy
hub / github.com/encode/httpx / get

Function get

httpx/_api.py:174–207  ·  view source on GitHub ↗

Sends a `GET` request. **Parameters**: See `httpx.request`. Note that the `data`, `files`, `json` and `content` parameters are not available on this function, as `GET` requests should not include a request body.

(
    url: URL | str,
    *,
    params: QueryParamTypes | None = None,
    headers: HeaderTypes | None = None,
    cookies: CookieTypes | None = None,
    auth: AuthTypes | None = None,
    proxy: ProxyTypes | None = None,
    follow_redirects: bool = False,
    verify: ssl.SSLContext | str | bool = True,
    timeout: TimeoutTypes = DEFAULT_TIMEOUT_CONFIG,
    trust_env: bool = True,
)

Source from the content-addressed store, hash-verified

172
173
174def get(
175 url: URL | str,
176 *,
177 params: QueryParamTypes | None = None,
178 headers: HeaderTypes | None = None,
179 cookies: CookieTypes | None = None,
180 auth: AuthTypes | None = None,
181 proxy: ProxyTypes | None = None,
182 follow_redirects: bool = False,
183 verify: ssl.SSLContext | str | bool = True,
184 timeout: TimeoutTypes = DEFAULT_TIMEOUT_CONFIG,
185 trust_env: bool = True,
186) -> Response:
187 """
188 Sends a `GET` request.
189
190 **Parameters**: See `httpx.request`.
191
192 Note that the `data`, `files`, `json` and `content` parameters are not available
193 on this function, as `GET` requests should not include a request body.
194 """
195 return request(
196 "GET",
197 url,
198 params=params,
199 headers=headers,
200 cookies=cookies,
201 auth=auth,
202 proxy=proxy,
203 follow_redirects=follow_redirects,
204 verify=verify,
205 timeout=timeout,
206 trust_env=trust_env,
207 )
208
209
210def options(

Callers

nothing calls this directly

Calls 1

requestFunction · 0.85

Tested by

no test coverage detected