Skip to main content

rama/http/
mod.rs

1//! rama http support
2//!
3//! mostly contains re-exports from
4//! `rama-http` and `rama-http-backend`.
5
6#[doc(inline)]
7pub use ::rama_http::{
8    Body, BodyCaptureEvent, BodyCaptureSink, BodyDataStream, BodyExtractExt, BodyLimit,
9    BodyLimitLayer, BodyLimitService, BufferedBodyCapture, CaptureBody, CaptureCanceled,
10    CaptureHandle, CaptureLimit, CaptureOutcome, CapturedBody, HeaderMap, HeaderName, HeaderValue,
11    HttpError, HttpResult, InfiniteReader, Method, Request, Response, StatusCode, StreamingBody,
12    Version, body, conn, convert, fingerprint, header, headers, io, layer, matcher, mime,
13    opentelemetry, proto, protocols, request, response, service, sse, utils,
14};
15
16/// HTTP proxy types, request utilities, and MITM support.
17pub mod proxy {
18    #[doc(inline)]
19    pub use ::rama_http::proxy::*;
20    #[cfg(feature = "http-backend")]
21    #[cfg_attr(docsrs, doc(cfg(feature = "http-backend")))]
22    #[doc(inline)]
23    pub use ::rama_http_backend::proxy::*;
24}
25
26#[cfg(feature = "http-backend")]
27#[cfg_attr(docsrs, doc(cfg(feature = "http-backend")))]
28#[doc(inline)]
29pub use ::rama_http_core as core;
30
31// `EasyHttpWebClient` and its connector builder additionally need `dns` + `tcp`
32// on top of `http-backend` (default dns/transport connectors, proxy tunneling, ...).
33#[cfg(all(feature = "http-backend", feature = "dns", feature = "tcp"))]
34#[cfg_attr(
35    docsrs,
36    doc(cfg(all(feature = "http-backend", feature = "dns", feature = "tcp")))
37)]
38pub mod client;
39
40#[cfg(feature = "http-backend")]
41#[cfg_attr(docsrs, doc(cfg(feature = "http-backend")))]
42#[doc(inline)]
43pub use ::rama_http_backend::server;
44#[cfg(feature = "ws")]
45#[cfg_attr(docsrs, doc(cfg(feature = "ws")))]
46#[doc(inline)]
47pub use ::rama_ws as ws;
48
49// `CertIssuerHttpClient` builds on `EasyHttpWebClient`, hence the same gates as `http::client`.
50#[cfg(all(
51    feature = "tls",
52    feature = "http-backend",
53    feature = "dns",
54    feature = "tcp"
55))]
56#[cfg_attr(
57    docsrs,
58    doc(cfg(all(
59        feature = "tls",
60        feature = "http-backend",
61        feature = "dns",
62        feature = "tcp"
63    )))
64)]
65pub mod tls;
66
67#[cfg(feature = "grpc")]
68#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))]
69#[doc(inline)]
70pub use ::rama_grpc as grpc;
71#[cfg(feature = "inspect")]
72#[doc(inline)]
73pub use ::rama_http::inspect;