Deployment Error when Caching Request Body on POST Method
See original GitHub issueI’m trying to enable caching on a POST
method endpoint based on the request body. When I try and deploy I get the following error (replacing sensitive info with XXXX):
Serverless Error ---------------------------------------
An error occurred: XXXX - Invalid mapping expression specified: Validation Result: warnings : [], errors : [Invalid mapping expression specified: method.request.body] (Service: AmazonApiGateway; Status Code: 400; Error Code: BadRequestException; Request ID: a86f8247-9c10-4433-964c-386d334bfd64).
Here are my configuration settings for the endpoint (replacing sensitive info with XXXX):
events:
- http:
integration: lambda-proxy
path: apps/XXXX/XXXX
method: post
cors: true
authorizer:
name: XXXX
arn: >-
XXXX
caching:
enabled: true
cacheKeyParameters:
- name: request.body
Is there something I’m missing?
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Is it possible to cache POST methods in HTTP? - Stack Overflow
Some HTTP methods MUST cause a cache to invalidate an entity. This is either the entity referred to by the Request-URI, or by...
Read more >HTTP caching - MDN Web Docs
The HTTP cache stores a response associated with a request and reuses the stored response for subsequent requests.
Read more >Writing REST Services with RESTEasy Reactive - Quarkus
Accessing the request body. Any method parameter with no annotation will receive the method body., after it has been mapped from its HTTP ......
Read more >Web API implementation - Best practices for cloud applications
A POST request can contain the details for multiple new resources and ... whether the data in the body of the response can...
Read more >How to Fix a 400 Bad Request Error (Causes and Fixes) - Kinsta
The 400 Bad Request error indicates that the server cannot or process the request due to a client error. Read about the common...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
#65 Solved this!
any news on this ? need caching for post body (entire or some specific keys)