Closed exul closed 4 years ago
Ideally we'd like to have TryInto<Mime>
as argument, but right now Mime
does not implement TryFrom
for strings, so better to stick with &str
for the type being.
We can relax it later if http_types
provides additional conversions.
Thank you for the PR!
This method allows to set a body and the content type to pass any payload as
Vec<u8>
, without having to overwrite the content type by callinginsert_header
withContent-Type
.I'm not sure if
mime
should be passed ashttp_types::Mime
or just as&str
to have less boilerplate code in the test. Edit: I've updated the code to pass a&str
, otherwise the user of the library needs thehttp_types
crate as a dev dependency just to be able to passhttp_types::Mime
.Closes https://github.com/LukeMathWalker/wiremock-rs/issues/3.