Closed hukl closed 11 years ago
For other requests than get and delete, perform_request always sets an empty string as the content-type. The httpc api is a bit weird but this needs to be fixed.
https://github.com/wooga/etest_http/blob/master/src/etest_http.erl#L19
probably by adding a perform_post marco which accepts and additional content-type argument and defaulting the others to url-form-encoded
OR
look in the headers dict for /content-type/i field and pass that into the content-type parameter for httpc:request
Agreed. I just added a PR for this based on your second suggestion. https://github.com/wooga/etest_http/pull/7
For other requests than get and delete, perform_request always sets an empty string as the content-type. The httpc api is a bit weird but this needs to be fixed.
https://github.com/wooga/etest_http/blob/master/src/etest_http.erl#L19
probably by adding a perform_post marco which accepts and additional content-type argument and defaulting the others to url-form-encoded
OR
look in the headers dict for /content-type/i field and pass that into the content-type parameter for httpc:request