Skip to main content

http_request/
lib.rs

1//! http-request
2//!
3//! An HTTP request library providing client-side HTTP request construction and response parsing.
4
5mod common;
6mod request;
7mod response;
8mod utils;
9
10pub use {request::*, response::*};
11
12pub use http_type::{
13    ACCEPT, ACCEPT_ANY, BR_BYTES, COLON_U8, CONTENT_LENGTH, CONTENT_TYPE, Compress, ContentType,
14    HOST, HTTP_BR_BYTES, HTTPS_LOWERCASE, HashMapXxHash3_64, HttpStatus, HttpUrlComponents,
15    HttpVersion, LOCATION, Method, Protocol, QUERY, RequestError, RequestHeadersKey,
16    RequestHeadersValue, ResponseStatusCode, SPACE_U8, TAB_U8, USER_AGENT, hash_map_xx_hash3_64,
17};
18
19pub use std::{
20    collections::{HashMap, HashSet, VecDeque},
21    fmt::{self, Display, Formatter},
22    io::{Read, Write},
23    net::{Ipv4Addr, Ipv6Addr, TcpStream},
24    pin::Pin,
25    str::from_utf8,
26    string::FromUtf8Error,
27    sync::Arc,
28    task::{Context, Poll},
29    time::Duration,
30    vec::IntoIter,
31};
32
33pub use {
34    http_type::tokio::io::{AsyncRead, AsyncReadExt, AsyncWrite, AsyncWriteExt, ReadBuf},
35    rustls::{
36        ClientConfig, ClientConnection, RootCertStore, StreamOwned,
37        pki_types::{InvalidDnsNameError, ServerName},
38    },
39    serde::Serialize,
40    tokio_rustls::TlsConnector,
41    webpki_roots::TLS_SERVER_ROOTS,
42};
43
44use common::*;
45use lombok_macros::*;