blog icon indicating copy to clipboard operation
blog copied to clipboard

Trying the REST Client extension for VSCode

Open utterances-bot opened this issue 4 years ago • 4 comments

Trying the REST Client extension for VSCode

https://asp.net-hacker.rocks/2021/03/01/rest-client-vscode.html

utterances-bot avatar Oct 08 '21 22:10 utterances-bot

Hi Jürgen , How can we post image? Like png or jpeg file

deekshith-hari avatar Oct 08 '21 22:10 deekshith-hari

Hi @deekshith-hari That's a good question. I found the answer here by searching the page for "multipart/form-data": https://github.com/Huachao/vscode-restclient

POST https://api.example.com/user/upload
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW

------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="text"

title
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="image"; filename="1.png"
Content-Type: image/png

< ./1.png
------WebKitFormBoundary7MA4YWxkTrZu0gW--

Hope it helps

JuergenGutsch avatar Oct 22 '21 14:10 JuergenGutsch

Thank you @juergenGutsch . It worked. :)

deekshith-hari avatar Oct 22 '21 17:10 deekshith-hari

Great :-D

JuergenGutsch avatar Oct 22 '21 19:10 JuergenGutsch