Reputation: 1
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.
Upvotes: 0
Views: 292
Reputation: 711
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.
Upvotes: 1