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