The REST endpoint is accepting multipart/form-data but expects that one part with specific name has a content-type set to application/json. This is currently not possible to achieve in Insomnia client, where it's possible to select only text, text (multi-line) or file part type.
Server expects following request:
POST http://localhost:9998/v1/recipes/upload
accept: text/html, image/gif, image/jpeg, ; q=.2, */; q=.2
connection: keep-alive
content-length: 1917
content-type: multipart/form-data;boundary=Boundary_1_1757933443_1511447510179
host: localhost:9998
mime-version: 1.0
user-agent: Jersey/2.23.1 (HttpUrlConnection 1.8.0_144)
--Boundary_1_1757933443_1511447510179
Content-Type: application/json
Content-Disposition: form-data; name="recipe"
{"links":[],"id":null,"name":"cool-recipe-900"}
--Boundary_1_1757933443_1511447510179
Content-Type: application/octet-stream
Content-Disposition: form-data; filename="sample.recipe"; modification-date="Thu, 23 Nov 2017 14:31:19 GMT"; size=1297; name="file"
{
...
}
--Boundary_1_1757933443_1511447510179--
馃憢 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.
+1, I'm not sure if this is already possible, but I'd like the ability to do this as I'm struggling with exactly the same issue.
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.
Any news?
No news yet but going to mark this as Accepted, as I think it's a good fit for Insomnia.
Has this been implemented? Why is the issue closed?
Most helpful comment
No news yet but going to mark this as Accepted, as I think it's a good fit for Insomnia.