qiniu_http_client/client/request/
mod.rs1mod builder;
2mod built;
3mod multipart;
4mod request_metadata;
5
6pub use qiniu_http::SyncRequestBody;
7use std::borrow::Cow;
8
9#[cfg(feature = "async")]
10pub use qiniu_http::AsyncRequestBody;
11
12pub type QueryPairKey<'q> = Cow<'q, str>;
14
15pub type QueryPairValue<'q> = Cow<'q, str>;
17
18pub type QueryPair<'q> = (QueryPairKey<'q>, QueryPairValue<'q>);
20
21#[derive(Clone, Copy, Debug, Default)]
23#[non_exhaustive]
24pub enum Idempotent {
25 Always,
27
28 #[default]
32 Default,
33
34 Never,
36}
37
38pub use builder::{RequestBuilder, RequestBuilderParts, RequestParts, SyncRequestBuilder};
39pub(super) use built::{InnerRequest, InnerRequestParts};
40pub use multipart::{FieldName, FileName, Multipart, Part, PartMetadata, SyncMultipart, SyncPart, SyncPartBody};
41
42#[cfg(feature = "async")]
43pub use {
44 builder::AsyncRequestBuilder,
45 multipart::{AsyncMultipart, AsyncPart, AsyncPartBody},
46};
47
48pub(super) type SyncInnerRequest<'r, E> = InnerRequest<'r, SyncRequestBody<'r>, E>;
49
50#[cfg(feature = "async")]
51#[cfg_attr(feature = "docs", doc(cfg(feature = "async")))]
52pub(super) type AsyncInnerRequest<'r, E> = InnerRequest<'r, AsyncRequestBody<'r>, E>;