Skip to main content

Crate bt_http_utils

Crate bt_http_utils 

Source
Expand description

Defines a HttpClient struct and its associated methods, which provides a simple and efficient way to make HTTP requests. It includes methods to set custom headers and retrieve default headers, as well as handling cookies if needed. It also defines an HttpResponse struct to represent the response from a HTTP request.

Modules§

stream_response

Structs§

HttpClient
HttpClient: client: A Client instance from the reqwest crate for making HTTP requests. headers: A HeaderMap to store custom headers.
HttpResponse
HttpResponse: Represents the response from an HTTP request. status_code: The status code of the HTTP response. header: A HashMap containing the headers from the response. body: The body content of the HTTP response as a string.

Enums§

ContentType
ContentType: An enum to specify the content type of the request or response. Currently supports JSON and TEXT.

Constants§

DANGER_ACCEPT_INVALID_CERTS
DANGER_ACCEPT_INVALID_HOSTNAMES