Closed markgollnick closed 6 years ago
👋 Thanks for opening your first issue! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. If you're requesting a feature 🎁, please provide real use cases that would benefit. 👪
To help make this a smooth process, please be sure you have first read the contributing guidelines.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Seems like it hasn't been implemented, would you like to share any info whether you plan to add support for it?
It seems like this one has fairly low demand. However, I'd be open to a community contribution as long as it's not too complicated (won't require ongoing maintenance).
I think, if it were to be added, it should be an opt-in option toggleable within the form editor.
P.S. Insomnia already performs its own multipart/form-data
construction so the necessary hooks are already present.
I don't think that there is low demand for it, it might just be that multipart POSTs aren't used that often. And as you probably know not everybody asks questions when something doesn't work, uninstalling it is done quickly ;) Especially since it's open source and free.
In fact not being able to set the content type for a part makes it - I'm sorry to say it - useless. I noticed in multipart.js that the two newlines are sent immediately after the content disposition so I have absolutely no chance to hack the body to make it work.
I'm trying to send a multipart POST where the first part is a JSON followed by two PNG-images. The server is restrictive about this and returns an error, because I failed to specify the content type for the parts. I don't think that's actually bad, it's some additional security level on the server.
Therefore, please add support for header fields per part. Or, as far as I'm concerned, at least allow to specify a content type per part.
EDIT: actually the last line is wrong. I just noticed that I also have to specify a Content-Transfer-Encoding
for a use-case.
Is there any chance that we can have support for this please?
When using a Multipart Form request to upload one or more files with unicode code-points in the file name(s), it would be great if the Content-Disposition header parameter values could be percent-encoded per RFC 2231/5987 (see also), as some services don’t seem to accept the raw UTF-8 strings currently being sent by Insomnia.
Details
Insomnia currently sends Multipart Form requests like this when uploading a file:
However, it would be great if users had the option to send this instead:
From a quick perusal of the relevant documentation, sending Content-Disposition as anything but plain ASCII seems to be a non-conformity with the specs, so at first I thought this was a bug… however, upon further investigation, it also seems that every client and user-agent under the sun (that I tested) is ignoring this and sending raw UTF-8 these days (woohoo?). I tested curl, Chrome, Firefox, Safari, Postman, etc., and to my surprise, all of them seem to send raw UTF-8. The only client or library I’ve encountered so far that actually does send percent-escaped ASCII is the Python requests library:
So, my guess is that perhaps percent-encoding will gradually become less and less of a need in the future (woohoo!) but for now, there are still some services that depend upon it, so having the option to turn it on and off would be super handy until everything on the internet can get officially transitioned over to more modern textual codecs, and the relevant RFCs are antiquated/obsoleted by others… more quickly said than done. ;)