Hello all, I’m trying to make a POST request using HTTPoison, where I need to set the Content-Type
header.
According to this test, this should let us set the Content-Type
to multipart/form-data
:
HTTPoison.post "https://validator.nu", {:form, [doc: "HTML"]}, [{"Content-Type", "multipart/form-data"}]
…but it doesn’t. At least, the server complains with “application/x-www-form-urlencoded not supported. Please use multipart/form-data.”.
I’ve also tried posting it to https://httpbin.org/post, which reflects back what you send it, and I don’t see this header being set.
What am I doing wrong?