Expand description
HTTP helpers shared by the generated REST client codegen.
These are intentionally low-level and provider-agnostic so that the macro output stays small and the helpers can be unit-tested in isolation.
Functionsยง
- attach_
internal_ token - Attach the platform-plane credential from
provider(if any) to a RESTRequestBuilderas the sensitiveX-ToolKit-Internal-Tokenheader. - body_
to_ byte_ stream - Adapt any
http_body::Bodyinto aStream<Item = Result<Bytes, E>>of data frames, dropping trailers. - build_
request_ url - Build a fully-qualified URL by substituting path parameters and appending a
pre-encoded query string, returning
TransportErroron failure. - map_
http_ error - Map a non-success HTTP response into a
TransportError. - parse_
retry_ after - Parse a
Retry-Afterresponse header as a delta-seconds [Duration]. - to_
http_ method - Map an HTTP method enum to
http::Method.