Quantcast
Channel: Active questions tagged header - Stack Overflow
Viewing all articles
Browse latest Browse all 700

How to set a request header in behat tests?

$
0
0

I am developing a Rest API and testing it with Behat and mink-selenium2-driver (for the first time) . For security purposes, every call needs to contain a apikey in the request header.

My Problem is, i cannot set the header. My test looks like this:

Given I add "X_ApiKey" header equal to "test"When I send a GET request to "/notice"Then the response status code should be 200

But I keep getting a 403.

Any solutions?


Viewing all articles
Browse latest Browse all 700

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>