You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Encoding the request payload as a GET is extremely obtuse and makes creating new clients difficult and non-intuitive for other developers.
Describe the feature you'd like
Instead decoding the request in the Lambda, re-factor the API gateway implementation to pass along the payload json so that the API supports either POST or PUT as the verb and a normal JSON payload.
Additional context
Encoding payload in GET instead of using url parameters, as well as using GET for something that modifies data goes against RESTUL conventions in general.
The text was updated successfully, but these errors were encountered:
kpconnell
changed the title
Use a proper Proper REST Methods (POST or PUT)
Use proper Proper REST Methods (POST PUT or PATCH)
Mar 26, 2024
kpconnell
changed the title
Use proper Proper REST Methods (POST PUT or PATCH)
Use proper proper REST Methods (POST PUT or PATCH) and send payload normally
Mar 26, 2024
I don't agree with this, any request made to SIH is retrieving a resource, which feels like exactly the use case for a GET request. Making a request with edits doesn't modify any data, it retrieves the requested image, generating it if required. As well, we're using CloudFront to cache responses to these requests in order to prevent having the Lambda generate image for duplicate requests, which wouldn't be possible with POST or PUT requests.
I'm going to close this issue for now, but feel free to re-open if I've missed or misunderstood anything,
Thanks for your interest in Serverless Image Handler,
Simon
You may disagree with which verb, (this DOES create data which you agreed to) but even if you like your GET , why not use proper query string parameters like the rest of the world does?
Is your feature request related to a problem? Please describe.
Encoding the request payload as a GET is extremely obtuse and makes creating new clients difficult and non-intuitive for other developers.
Describe the feature you'd like
Instead decoding the request in the Lambda, re-factor the API gateway implementation to pass along the payload json so that the API supports either POST or PUT as the verb and a normal JSON payload.
Additional context
Encoding payload in GET instead of using url parameters, as well as using GET for something that modifies data goes against RESTUL conventions in general.
The text was updated successfully, but these errors were encountered: