Thursday, September 9, 2021

How to create a Post request with Multipart header to upload a file through Postman

 Scenario:

Create a Post Request to upload two files along with some input data through Postman.

Note: Handling of this Post Request for file uploading will be discussed in next Blog.

Steps:

  • Open Postman and create a Post request            
  • Click on the Body tab and then select form-data radio button

  • Enter the field name like "myfile1" in textbox in column with Header KEY and then select "File" from the drop down

  • Once you select File from the dropdown, you will get a button "Select Files" under the column VALUE. You can click on this button and can select the file that you want to upload.


  • Now, suppose you want to send name and emailId and input data with this Post request. So, you should add the field names like "name" and "emailId" in KEY column and corresponding values in VALUE column. Here, by default, TEXT remains selected.






No comments:

Post a Comment

Please provide your precious comments and suggestion