I’m using netlify functions for an API. Most of which is working perfectly fine, apart from when I am needing to access URL parameters
Here is a snippet of what i have to get the parameter:
func Handler(ctx context.Context, request events.APIGatewayProxyRequest) (Response, error) {
id := request.PathParameters["id"]
...
}
func main() {
lambda.Start(Handler)
}
I have other functions that are working correctly that do not require URL params but cannot figure out how to get these ones working, I have tried multiple different selections:
https://example.com/endpoint/1
https://example.com/endpoint/id=1
https://example.com/endpoint?id=1
None of the above return the id path parameter when hitting the endpoint