Skip to main content

Crate yttp

Crate yttp 

Source
Expand description

§yttp - “Better HTTP”

A JSON/YAML façade for HTTP requests and responses. Provides header shortcuts, smart auth, content-type-driven body encoding, and structured response formatting.

Structs§

Request
Parsed HTTP request, ready to send.
Response
Structured response.
Status
Structured status.
UrlParts
URL components.

Enums§

Error
Error type for yttp operations.

Functions§

append_query_to_url
Append query parameters from a q: value to a URL string.
build_query_string
Build a URL query string from an object of key-value pairs.
encode_body
Encode response body for structured output: JSON → value, UTF-8 → string, binary → base64.
expand_headers
Expand shortcut keys and values in a headers map.
format_response
Format a full response as a structured value (s!, h, b).
headers_to_raw
Build request headers as raw HTTP string.
parse
Parse a JSON/YAML string into a serde_json::Value.
parse_request
Parse a request from a JSON/YAML value, expanding header shortcuts.
parse_url
Parse URL into components.
resolve_method
status_inline
Format status as an inline object {v, c, t}.

Type Aliases§

Result