wooga / etest_http

etest Assertions around HTTP (client-side)
Other
52 stars 20 forks source link

perform_request ignores content-type header #5

Closed hukl closed 11 years ago

hukl commented 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

dry commented 11 years ago

Agreed. I just added a PR for this based on your second suggestion. https://github.com/wooga/etest_http/pull/7