Im doing some automation in Testcafe, I arrive at the documentation of Intercept HTTP Requests, and Create a Custom Request Hook, my doubt is, can I send a header to a "get" that request the URL that I trying to navigate, I have the token but I don't know how to pass the header to the "get" that make the web-app.
Asked
Active
Viewed 227 times
1 Answers
1
You can set additional header in the onRequest
method of the RequestHook
. Navigate to the following section with TestCafe examples: Control HTTP Requests. The "Set a Custom Referrer" example shows how to set a custom Referer
header for specified requests during tests.

wentwrong
- 711
- 4
- 7