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
sendPOST and urlencoded data #1914
Comments
Parameters are always converted to json when passed to debug log. See if($method == 'GET') {
$this->debugSection("Request", "$method $url");
} else {
$this->debugSection("Request", "$method $url ".json_encode($parameters));
} |
Not a bug. |
Hi @Naktibalda is there a work around for this ? How can we send non json format as part of post request (x-www-form-urlencoded) ? |
@shivavuppala You want a workaround for non-bug, it was an issue of visual representation. Don't set content-type header to application/json. |
@Naktibalda my request has a header of content type as (application/x-www-form-urlencoded). |
@Naktibalda Below is the Request and Response console.log("Auth = " + auth.data.access_token); Response: |
Where as it works fine with additional parameter type when tried using mocha |
What has your code got to do with Codeception? |
Am getting error on codeceptjs for 'sendPostRequest'. Is it different from codeception? |
CodeceptJS is a different project. |
It seems that I am unable to execute a POST with the form-urlencoded data, and my parameters
are always converted to json regardless of the content-type header
I have http header "Content-Type","application/x-www-form-urlencoded"
I send post "oauth2/access_token",{"client_id":"test-client-id","client_secret":"test-client-secret","grant_type":"password","username":"pdpp@dssdpdpd.com","password":"pdpassword"}
[Request headers] {"Content-Type":"application/x-www-form-urlencoded"}
[Request] POST /v1/oauth2/access_token {"client_id":"test-client-id","client_secret":"test-client-secret","grant_type":"password","username":"pdpp@dssdpdpd.com","password":"pdpassword"}
and w/o the headers
[Request headers] []
[Request] POST /v1/oauth2/access_token {"client_id":"test-client-id","client_secret":"test-client-secret","grant_type":"password","username":"pdpp@dssdpdpd.com","password":"pdpassword"}
./vendor/bin/codecept -V
Codeception version 2.0.13
The text was updated successfully, but these errors were encountered: