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}.