Dims
Dims

Reputation: 50999

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?

Upvotes: 7

Views: 6582

Answers (1)

streetturtle
streetturtle

Reputation: 5850

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

Upvotes: 10

Related Questions