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.
We currently follow the "default" behavior provided by
http-types
- if you pass a vector of bytes as body, viaset_body_bytes
, we will set the Content-Type header toapplication/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.