Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to send file as a parameter of POST request in REST Client in IntelliJ?

I want to send <MYURL>/myaddres?path=<MYPATH>&content=<MYCONTENT> to a service with editor based REST client in IntelliJ, but take the content of <MYCONTENT> from a file.

Is it possible?

like image 327
Dims Avatar asked Apr 25 '19 14:04

Dims


Video Answer


1 Answers

Yes, you should type the < symbol followed by the path to the file:POST

POST http://example.com:8080/api/html/post
Content-Type: application/json

< ./input.json

More info: https://www.jetbrains.com/help/idea/exploring-http-syntax.html#provide-request-body

like image 183
streetturtle Avatar answered Oct 12 '22 17:10

streetturtle