nvim-ship icon indicating copy to clipboard operation
nvim-ship copied to clipboard

multipart/form-data working fine?

Open rodhash opened this issue 1 year ago • 2 comments

Hi

Not sure if I'm missing something but can't make it work. Everything else seems to work just fine with nvim-ship but form-data just doesn't work for me.

ie:

~[BASE]~
url {{host}}/users/edit/669b797bce49760fe6c18994
method PATCH
env ./env/env.lua

~[HEADERS]~
authorization Bearer {{token}}
accept */*
accept-encoding gzip, deflate, br
Content-Type: multipart/form-data


~[BODY]~
name=foo

With Postman this route works just fine but whenever I try to send a form from nvim-ship the data doesn't reach my endpoint, body is empty.

Any suggestion?

Thanks

rodhash avatar Jul 21 '24 06:07 rodhash

Hi, @rodhash

Try the body parameter without equals sign:

~[BODY]~
name foo

javiorfo avatar Jul 21 '24 14:07 javiorfo

Hi @javiorfo

Tried without equals sign but the same happened, no body data reach my endpoint

ps: sending data to other routes and verbs work just fine when using JSON, I'm struggling only with form-data

rodhash avatar Jul 21 '24 16:07 rodhash

This plugin has been migrated to Zig allowing to use multipart/form-data

Example here

javiorfo avatar Jan 22 '25 17:01 javiorfo