How to encode parameters for AWS API Gateway (HTTP API)?

18 views Asked by At

I am building an HTTP API in AWS Gateway, and I can't understand how to encode the path parameters.

The documentation says

API Gateway decodes URL-encoded request parameters before passing them to your backend integration.

But apparently there is more to it than that....


I have a route GET /{example}/thing, and I want to pass a/b as the parameter.

If I request /a/b/thing, I get 404 Not Found.

If I request /a%2Fb/thing, I get 404 Not Found.

If I request /a%25Fb/thing, I get 404 Not Found.

If I request /a%2525Fb/thing, I get 200 OK, but the Lambda function gets the parameter a%2Fb.

What encoding does API Gateway (HTTP API) use for its parameters?

How should encode the parameter a/b?

0

There are 0 answers