Skip to main content

r402_http/
lib.rs

1//! HTTP transport layer for the x402 payment protocol.
2//!
3//! Provides header encoding/decoding, constants, and (feature-gated)
4//! client/server middleware for the x402 payment protocol.
5//!
6//! # Modules
7//!
8//! - [`constants`] — HTTP header names, status codes, default URLs
9//! - [`headers`] — Base64 encoding/decoding for x402 HTTP headers
10//! - [`error`] — HTTP transport error types
11//! - [`facilitator`] — HTTP facilitator client (feature: `client`)
12//! - [`client`] — reqwest-middleware for automatic 402 handling (feature: `client`)
13//! - [`types`] — HTTP server types (feature: `server`)
14//! - [`server`] — Axum/Tower payment gate middleware (feature: `server`)
15
16pub mod constants;
17pub mod error;
18pub mod headers;
19
20#[cfg(feature = "client")]
21pub mod client;
22#[cfg(feature = "client")]
23pub mod facilitator;
24
25#[cfg(feature = "server")]
26pub mod paygate;
27#[cfg(feature = "server")]
28pub mod server;
29#[cfg(feature = "server")]
30pub mod types;