LukeMathWalker / wiremock-rs

HTTP mocking to test Rust applications.
Apache License 2.0
620 stars 70 forks source link

Content-Type header #3

Closed LukeMathWalker closed 4 years ago

LukeMathWalker commented 4 years ago

We currently follow the "default" behavior provided by http-types - if you pass a vector of bytes as body, via set_body_bytes, we will set the Content-Type header to application/octet-stream.

Based on user feedback, this can be confusing/surprising. Would it be worth introducing a set_body_raw that requires the caller to explicitly specify the Content-Type? We should also look into improving the docs of all body methods to make sure the behavior is clear and the new method easy to discover.