util: move Structured Values parser to http module

This commit is contained in:
anna 2023-01-26 18:33:08 +01:00
parent 88b7268dcc
commit ea7af860b2
Signed by: fef
GPG key ID: EC22E476DC2D3D84
5 changed files with 12 additions and 5 deletions

View file

@ -12,7 +12,7 @@ use mime::Mime;
use reqwest::header::HeaderValue; use reqwest::header::HeaderValue;
use std::str::FromStr; use std::str::FromStr;
use crate::util::header::{Item, ParseHeader, ParseOptions}; use crate::util::http::header::{Item, ParseHeader, ParseOptions};
/// Helper structure for parsing the `Content-Type` header for JSON-LD. /// Helper structure for parsing the `Content-Type` header for JSON-LD.
pub struct ContentType { pub struct ContentType {

View file

@ -12,7 +12,7 @@ use iref::{IriRef, IriRefBuf};
use reqwest::header::HeaderValue; use reqwest::header::HeaderValue;
use std::str::FromStr; use std::str::FromStr;
use crate::util::header::{Item, ParseHeader, ParseOptions}; use crate::util::http::header::{Item, ParseHeader, ParseOptions};
pub struct Link { pub struct Link {
href: IriRefBuf, href: IriRefBuf,

View file

@ -6,6 +6,9 @@ use crate::core::*;
use crate::state::AppState; use crate::state::AppState;
use crate::util::bear::Bearcap; use crate::util::bear::Bearcap;
/// Almost complete implementation of [RFC 8941](https://www.rfc-editor.org/info/rfc8941).
pub mod header;
pub enum Response { pub enum Response {
Reqwest(reqwest::Response), Reqwest(reqwest::Response),
} }

View file

@ -1,12 +1,16 @@
/// Bearer Capabilities implementation, see <https://docs.joinmastodon.org/spec/bearcaps/>.
pub mod bear; pub mod bear;
/// RSA key and signature management stuff.
pub mod crypto; pub mod crypto;
/// Almost complete implementation of [RFC 8941](https://www.rfc-editor.org/info/rfc8941). /// Utilities related to HTTP.
pub mod header;
/// Wrappers for [`reqwest`].
pub mod http; pub mod http;
/// Password hashing facilities and types.
pub mod password; pub mod password;
/// Cursor utilities for parsers. /// Cursor utilities for parsers.
pub mod slice; pub mod slice;
/// Wrappers for [`jsonwebtoken`].
pub mod token; pub mod token;
/// Wrappers for various encoding schemes.
pub mod transcode; pub mod transcode;
/// Validation framework.
pub mod validate; pub mod validate;