Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Director ¶
Director sets the appropriate headers and rewrites the request path to remove the prefix if provided.
The path rewrite will remove the prefix from the inbound request path.
For example, if the `pathPrefix` is `/api` then a request is made to:
"POST /api/v1/tokens"
will be proxied to:
"POST /v1/tokens"
func FixedVersionDirector
deprecated
FixedVersionDirector wraps the director(pathPrefix) function and prepends a fixed API version (e.g. `/v1`).
This function should not be used as it couples all calls from the JavaScript to the API to the same API version. It is best to instead include the API version in path used by the JavaScript client. Including the version in the client allows us to slowly update screens/clients to use new API versions rather than requiring a big bang approach.
Deprecated: use director(pathPrefix) function instead.
Types ¶
This section is empty.