Expand description
Shared helpers for the serverless / function-as-a-service upstream plugins
(azure-functions, openfunction, openwhisk).
These plugins all invoke an external FaaS endpoint and return its reply as the gateway response. The helpers here centralize the request-forwarding shape (method, headers, query, target URL) and the outbound-error → status mapping so each plugin only adds its own auth header and response handling.
Functions§
- classify_
error - Maps an
OutboundErrorto a client-facing(status, message)pair used by the FaaS plugins’ error ports. - forward_
parts - Builds the forwarded request parts for a FaaS callout: the header list
(client headers minus hop-by-hop, with
Hostoverridden to the endpoint), the fully-qualified target URL (function_uripath plus the client’s query string), and the client’s HTTP method. - query_
string 🔒 - Encodes the request query parameters as a
&-joinedname=valuestring, sorted for stable output. Names and values are percent-encoded. - uri_
encode 🔒 - Percent-encodes per RFC 3986, keeping the unreserved set intact.
Type Aliases§
- Forward
Parts - The forwarded request parts for a FaaS callout: header list, target URL, and HTTP method.