Open moll opened 1 month ago
I've never tried this, but it looks like partContentType
can be set to Nothing
.
If I'm not mistaken, that won't be possible if the constructor is not exported in https://github.com/snoyberg/http-client/blob/6f742e857a91b37f9d1618a30510fc4f97989342/http-client/Network/HTTP/Client/MultipartFormData.hs. I think I saw in a mention of making the constructor private in a pre 2015 issue somewhere to permit easier implementation changes without affecting the API.
Please see https://www.yesodweb.com/book/settings-types, it’s still possible to set these fields.
Hey,
Thanks for your continued maintenance of HttpClient!
I've been using the Multipart functionality in
Network.HTTP.Client.MultipartFormData
and noticed it insists on setting the Content-Type of a file part, derived from its file extension. Would you consider disabling that or giving a way to unset it? I'd like to use custom content-types or even leave them out.Perhaps if the implementation set a default header in the
Part
constructor instead of a separatePart
field, it'd be more general to also overwrite via a hypotheticalmodifyHeaders
accessor. Seems a tad odd for that header to be special-cased in the first place.Thanks!