Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to perform POST operation using BDD framework #3

Open
ganeshsam14 opened this issue Dec 2, 2016 · 1 comment
Open

How to perform POST operation using BDD framework #3

ganeshsam14 opened this issue Dec 2, 2016 · 1 comment

Comments

@ganeshsam14
Copy link

Thanks for sharing Python BDD framework and its really helpful to build over this.

Could you please help to perform POST operation using same framework?

@onikiforov
Copy link

Currently, behave-rest sends POST requests with parameters, in form "x-www-form-urlencoded"

For example, the feature:

 Given I set base URL to "http://www.mocky.io/v2"
 And I make a POST request to "58453162110000de1c0e6bf6" with parameters
 |itemsReceived|itemsAccepted|
 |1            |1            |
 Then the response status code should equal 200

Will produce next request:

POST http://www.mocky.io/v2/58453162110000de1c0e6bf6
Connection: keep-alive
Accept-Encoding: gzip, deflate
Accept: application/json
User-Agent: python-requests/2.10.0
Content-Length: 31 
Content-Type: application/x-www-form-urlencoded

itemsReceived=1&itemsAccepted=1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants