banner



How To Upload Image Postman Post

As a part of Postman Tutorial – Cease to End , in this post, nosotros volition learn how can we upload an prototype using Postman or Perform Upload API testing using Postman.

Sample API:-

We will utilize Upload Paradigm API provided by Imgur API.

If you lot see Upload Epitome API documentation, you will need below details to employ API:-

Generating Client ID:-

You lot can go client id past Registering at Imgur site. Once you register, you lot need to Add an App. Afterward that you can see your Client id as beneath:-

Creating Request in Postman:-

We take below things ready:-

URI:- https://api.imgur.com/three/upload

HTTP Verb :- POST

Client ID :- You know how to get.

Fields in Torso :- See above image.

Let's launch Postman app now and add URI and select POST method. We are skilful in that now. If not, refer this article.

There is a different style to pass body to upload API. In normal Post request, nosotros generally pass a JSON torso past selecting "row" radio button nether "Torso" tab. In Upload API, we demand to pass torso by selecting "form-data" radio push button. You can also discover the discussion "BODY formdata" in API documentation above.

Now you demand to pass field values as shown in API documentation:-

Let's get-go pass "image" field. Type key equally "paradigm" and remove focus from key field to save.

Now mouse hover on "paradigm" field, You should see a dropdown as below:-

When you click on drop down, you will see two options. Select "File" from that.

Once you select "File", y'all will see a push button to select epitome equally shown below:-

Now click on "Select Files" control and Select the file. You lot will see file proper name every bit value.

Other fields are optional but nosotros will pass "championship" and "description" as below:-

We need to pass Client ID equally an Authorisation header as per API documentation shown above.

We are all ready to upload image now. Click on Send button. You should see the response equally below:-

Y'all will run into a field named "link" in JSON response. WHen you hit the URL in browser, you lot will see same uploaded image.

You lot tin import above case drove from here. Practise not forget to generate your client id and pass in Header tab.

You can detect all Selenium related post here.
You can find all API manual and automation related posts here.
You can find ofttimes asked Java Programs here.

Writer: Amod Mahajan

My name is Amod Mahajan and I am an IT employee with 6+ years of experience in Software testing and staying in Bengaluru. My expanse of interest is Automation testing. I started from basics and went through and so many selenium tutorials. Cheers to Mukesh Otwani every bit his tutorials are easy and comprehend nuts to advance. I have addiction of exploring concepts by deep diving. I used to make notes. I thought of sharing my knowledge through posts and at present I am here. #KeepLearning #ShareLearning

How To Upload Image Postman Post,

Source: http://makeseleniumeasy.com/2019/11/26/postman-tutorial-part-49-how-to-upload-an-image-using-postman/

Posted by: chungandutimmose1944.blogspot.com

0 Response to "How To Upload Image Postman Post"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel