-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Cannot force Content-Type header after form fields apply #488
Comments
@inik7 great catch ! thanks for the info on how to replicate. fixed in dev as a workaround, you can prepare the request body manually: Given url 'https://httpbin.org'
And path '/post'
And request 'test=123'
And header Content-Type = 'application/json'
When method post
Then status 200 |
Thanks a lot for fixing and advice for workaround!
|
hello there. I think you are doing it wrong, and you first confused me with if all you are trying to do is submit a dynamic JSON, please just return a If you need any further assistance on this issue, first read the docs and then follow the instructions here: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue |
The idea is to send the body 'application/ x-www-form-urlencoded' with the header 'application/json'
|
is this a negative test case ? because this is not correct HTTP behavior. no body ever needs to do this. so please do not complain about "pain starts" ! if you need any thing else, make sure you follow the instructions. |
Ok) Yes, negative tests. Force header solve the problem :) |
I guessed it. just hard-code a string request and please don't try to implement dynamic parameters for this negative test case ! anyway in the next version it will be possible to over-ride the content-type for |
0.9.0 released |
Example
The text was updated successfully, but these errors were encountered: