cucumber-api icon indicating copy to clipboard operation
cucumber-api copied to clipboard

Default header values

Open jskirst opened this issue 8 years ago • 2 comments

Headers a reset after each request, which makes sense, but in most API calls header values are always the same (like a basic auth header or content type). It would significantly DRY up tests to allow for default headers to get set that bypass the need to say "I send and accept JSON" and other header settings.

jskirst avatar May 18 '17 00:05 jskirst

I'm going to open a PR for this shortly.

jskirst avatar May 18 '17 00:05 jskirst

I do this by making use of Background, which is applied to all scenarios in the Feature.

This PR shows an example: https://github.com/hidroh/cucumber-api/pull/26

biggianteye avatar May 19 '18 09:05 biggianteye