Given I set the request body to 'JSON-data'

Set request body data for POST/PUT requests.

Step pattern

Given (?:I set the request body to|we set the request body to|the request body is) '([^']*)'

Examples

Example #1
Given I set the request body to '{"name": "John", "email": "john@example.com"}'
Example #2
Given the request body is '{"title": "Test Post", "body": "This is a test"}'
Example #3
Given we set the request body to '{"org": "Webship.co", "active": true}'
Example #4
Given I set the request body to '{"id": 1, "tags": ["qa","api"]}'
Example #5
Given the request body is '{"username": "admin", "password": "secret"}'
Example #6
Given we set the request body to '{"email": "hello@un.org"}'
Example #7
Given I set the request body to '{"status": "published"}'