Interface test how to pass files in post request

When doing interface testing, I often encounter file upload interfaces. Today I will teach you how to use apipost to upload documents.

1. Open apipost and create a new interface about file upload

Interface test how to pass files in post request

2. Find the option body, enter the parameter name corresponding to the file, and then select the text after the parameter name as file.

Interface test how to pass files in post request

3. After the modification is completed, the parameter value box behind has been displayed as Please select file to upload, click to select the file to be uploaded

Interface test how to pass files in post request
Interface test how to pass files in post request

4. After the selection is complete, click the save interface and click request to send.

Interface test how to pass files in post request

This is how apipost implements file upload operations.

Tool download address:https://www.apipost.cn

Guess you like

Origin blog.51cto.com/12246704/2548073