ddd
ddd

Reputation: 5029

How to test rest API with large json

I am writing rest api with Flask. One of my endpoints handles a post request. One field of the request JSON 'audio' is supposed to contain the BASE64 encoded PCM file (audio format). If save this field to a file, it is about 200KB.

It might be too big to copy and paste in Swagger or Postman for testing. Even worse with curl command. Is there any good way to test with really big JSON in the request.

Upvotes: 2

Views: 2184

Answers (1)

RomanPort
RomanPort

Reputation: 91

I'd recommend a great tool called Insomnia. You can send point it to any file to send it as a HTTP request. You can change the Content-Type header to be application/json and select your JSON data file. Here's a screenshot of what the program looks like.

Upvotes: 1

Related Questions