amplify-category-api icon indicating copy to clipboard operation
amplify-category-api copied to clipboard

Feature request: Dynamic headers for the @http directive

Open zjullion opened this issue 4 years ago • 5 comments

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 avatar May 25 '20 19:05 zjullion

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 avatar May 26 '20 16:05 zjullion

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

ammarkarachi avatar May 26 '20 22:05 ammarkarachi

+1

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

dtelaroli avatar Jun 28 '20 23:06 dtelaroli

Yep. Definitely need this.

CodySwannGT avatar Feb 11 '22 15:02 CodySwannGT

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

rodfferreira avatar Apr 17 '24 22:04 rodfferreira