aws-amplify / amplify-category-api

The AWS Amplify CLI is a toolchain for simplifying serverless web and mobile development. This plugin provides functionality for the API category, allowing for the creation and management of GraphQL and REST based backends for your amplify project.
https://docs.amplify.aws/
Apache License 2.0
89 stars 77 forks source link

Feature request: Dynamic headers for the @http directive #306

Open zjullion opened 4 years ago

zjullion commented 4 years ago

Is your feature request related to a problem? Please describe. Currently, the @http directive allows path parameters, query strings, and the request body to be passed in as arguments - however, header values are static: You can specify a list of static headers to be passed with the HTTP requests to your backend in your directive definition.

Describe the solution you'd like I would like to be able to pass in values for headers in the same manner that other arguments can be passed in when using the @http directive

Describe alternatives you've considered I know there is likely some way to do this with a custom VTL template (which I am about to investigate), but this is really not ideal. One of the best ways that amplify-cli is improving is continually making custom VTL templates, custom cloudformation, etc unnecessary.

Additional context If this is already possible, and I'm just missing it, please let me know (and, if this is the case, the docs certainly need to be updated).

zjullion commented 4 years ago

After a little more fooling around, I've realized our team doesn't need this feature. I suppose it may be useful for others, but we no longer need this.

ammarkarachi commented 4 years ago

@zjullion Thanks for the update I will mark this as an enhancement and discuss it with out team

dtelaroli commented 4 years ago

+1

It's very useful to send dynamic credentials and another dynamic value

CodySwannGT commented 2 years ago

Yep. Definitely need this.

rodfferreira commented 6 months ago

Any news on this? It would be really useful to be able to send dynamic authentication tokens.