amplify-category-api
amplify-category-api copied to clipboard
Feature request: Dynamic headers for the @http directive
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).
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.
@zjullion Thanks for the update I will mark this as an enhancement and discuss it with out team
+1
It's very useful to send dynamic credentials and another dynamic value
Yep. Definitely need this.
Any news on this? It would be really useful to be able to send dynamic authentication tokens.