This module provides an HTTP request chipset for ReasonChip. It enables
asynchronous HTTP requests using httpx.AsyncClient
and returns
structured responses.
This chipset is a wrapper around httpx. You can find httpx documentation here: HTTPX Documentation
GET
, POST
, PUT
, DELETE
, etc.).View source code here: GitHub
Executes an HTTP request asynchronously using httpx.AsyncClient
and
returns the response.
Field | Type | Description |
---|---|---|
method | typing.Literal['GET', 'OPTIONS', 'HEAD', 'POST', 'PUT', 'DELETE', 'PATCH'] | HTTP method to use for the request (e.g., GET, POST, DELETE). |
url | Target URL for the request. | |
timeout | Request timeout in seconds. | |
headers | typing.Dict[str, str] | Optional HTTP headers to include in the request. |
content | typing.Optional[bytes] | Optional request body content as bytes. |
Field | Type | Description |
---|---|---|
status | typing.Literal['OK', 'TIMEOUT_ERROR', 'NETWORK_ERROR', 'PROTOCOL_ERROR', 'PROXY_ERROR', 'UNSUPPORTED_PROTOCOL_ERROR', 'DECODING_ERROR', 'TOO_MANY_REDIRECTS', 'HTTP_STATUS_ERROR', 'INVALID_URL', 'COOKIE_CONFLICT', 'STREAM_ERROR', 'ERROR'] | Status of the HTTP request execution. |
status_code | typing.Optional[int] | HTTP response status code (e.g., 200, 404). |
headers | typing.Dict[str, str] | Response headers received from the server. |
content | typing.Optional[bytes] | Response body content as bytes. |
Executes an HTTP request asynchronously using httpx.AsyncClient
and
returns the response. The request body is a JSON object.
Field | Type | Description |
---|---|---|
url | Target URL for the request. | |
timeout | Request timeout in seconds. | |
headers | typing.Dict[str, str] | Optional HTTP headers to include in the request. |
content | typing.Optional[typing.Dict[str, typing.Any]] | Optional request body content as bytes. |
Field | Type | Description |
---|---|---|
status | typing.Literal['OK', 'TIMEOUT_ERROR', 'NETWORK_ERROR', 'PROTOCOL_ERROR', 'PROXY_ERROR', 'UNSUPPORTED_PROTOCOL_ERROR', 'DECODING_ERROR', 'TOO_MANY_REDIRECTS', 'HTTP_STATUS_ERROR', 'INVALID_URL', 'COOKIE_CONFLICT', 'STREAM_ERROR', 'ERROR'] | Status of the HTTP request execution. |
status_code | typing.Optional[int] | HTTP response status code (e.g., 200, 404). |
headers | typing.Dict[str, str] | Response headers received from the server. |
content | typing.Optional[bytes] | Response body content as bytes. |
© 2025 South Patron LLC. All rights reserved.
AI everywhere.