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§
Structs§
- Http
Client - HttpClient: client: A Client instance from the reqwest crate for making HTTP requests. headers: A HeaderMap to store custom headers.
- Http
Response - 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§
- Content
Type - ContentType: An enum to specify the content type of the request or response. Currently supports JSON and TEXT.