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    cmp,
21    collections::{HashMap, HashSet, VecDeque},
22    fmt::{self, Debug, Display, Formatter},
23    io::{self, Read, Write},
24    mem,
25    net::{Ipv4Addr, Ipv6Addr, TcpStream},
26    pin::Pin,
27    str::from_utf8,
28    string::FromUtf8Error,
29    sync::Arc,
30    task::{Context, Poll},
31    time::Duration,
32    vec::IntoIter,
33};
34
35pub use {
36    http_type::tokio::io::{AsyncRead, AsyncReadExt, AsyncWrite, AsyncWriteExt, ReadBuf},
37    rustls::{
38        ClientConfig, ClientConnection, RootCertStore, StreamOwned,
39        pki_types::{InvalidDnsNameError, ServerName},
40    },
41    serde::Serialize,
42    tokio_rustls::TlsConnector,
43    webpki_roots::TLS_SERVER_ROOTS,
44};
45
46pub use common::*;
47pub use lombok_macros::*;