Upload a file with PUT/POST method on POSTMAN

后端 未结 2 1510
一整个雨季
一整个雨季 2021-02-14 05:33

I am trying to upload a file with POSTMAN to this url

http://localhost:3000/bucket/test/files/

And should got result in my controller there :<

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-14 06:12

    You might be doing it right but sometimes POSTMAN does not work well. I wrote an API to accept both text and file.
    While invoking service from Postman. 1. I set Content-Type as "application/json" and Accept as "application/json".
    2. In body I pass the text and file It was not working, I tried multiple time. I shut down post man and my laptop.

    Woke up next morning hit again and it worked. Below is image of working request.

提交回复
热议问题