Is there a way to update the headers in one feature file and use the Auth token from Karate.config.js?

This is explained in detail in the docs: https://github.com/intuit/karate#configure-headers

* configure headers = read('classpath:my-headers.js')

And you can refer to variables declared in karate-config.js anywhere in Karate. Again read the docs, and there are multiple examples. Next time please ask a more specific question: https://stackoverflow.com/help/minimal-reproducible-example

Leave a Comment