1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//! `http-query` is a client and server SDK for the **HTTP `QUERY` method**
//! ([RFC 10008]).
//!
//! `QUERY` is a safe, idempotent request method that carries a request body
//! describing a query to be evaluated against the target resource. Unlike GET,
//! the query travels in the body rather than the URI; unlike POST, the request
//! is safe and may be retried and cached.
//!
//! # Sending a query (requires the `client` feature, enabled by default)
//!
//! ```no_run
//! # async fn run() -> Result<(), http_query::Error> {
//! use http_query::Client;
//!
//! let client = Client::new();
//! let resp = client
//! .query_string("https://example.org/search", "application/sql", "SELECT 1")
//! .await?;
//! println!("status: {}", resp.status());
//! # Ok(()) }
//! ```
//!
//! # Discovering support
//!
//! [`Client::options`] issues an `OPTIONS` request and reports QUERY support
//! from the `Allow` and `Accept-Query` header fields. `Accept-Query` is parsed
//! as an [RFC 9651] Structured Fields list.
//!
//! # Result vs. equivalent resource
//!
//! A response may advertise two distinct URIs (RFC 10008 §2.3–2.4):
//! `Content-Location` (the stored result, [`Client::fetch_result`]) and
//! `Location` (the equivalent resource whose GET re-runs the query,
//! [`Client::fetch_equivalent`]).
//!
//! # Serving QUERY
//!
//! The [`server`] module provides framework-agnostic helpers to validate an
//! incoming QUERY request and advertise support. See `examples/axum_server.rs`.
//!
//! [RFC 10008]: https://www.rfc-editor.org/rfc/rfc10008.html
//! [RFC 9651]: https://www.rfc-editor.org/rfc/rfc9651.html
pub use ;
pub use cache_key;
pub use ;
pub use ;
pub use ;
pub use ;