A simple example demonstrating how to use custom headers in API responses.
- run
npm installto grab the dependencies - run
npm startto set up the lambda project under the default name on AWS - Check out the API ID in
claudia.json(the previous step creates the file) - Open https://API_ID.execute-api.us-east-1.amazonaws.com/latest/hard-coded-headers in a browser (replace API_ID with the API ID from
claudia.json) and inspect the headers. You should see anX-Versionheader with the value101, andContent-Typeoftext/plain
Check out web.js to see how the paths are set up. For more information, see the Claudia Api Builder documentation.