How To Use Postman

Nasser Sanou
4 min readDec 4, 2018

--

Postman is a great tool to work with apis. You can access resources or test apis.

to make sure the pages are working properly. You can perform some actions to verify that your application is behaving the way you expect.

You can access at https:/postman.com. You have the option of signing in and working on the website or downloading it locally for Mac, windows or Linux. There is also a chrome extension available for Postman.

Steps To Install & Authorize New Apps

  1. Download the latest version of Postman.
  2. Double click on the .zip file and extract the app (or .exe file if you are using Windows) for Postman.
  3. If you are on Mac, drag the Postman app into your Applications folder. If you are using Windows or Linux, double click on the installation file and follow the directions through the installation accordingly.
  4. Once you have installed Postman, double click on the Postman icon to open the app. You should see something like this:

Bellow is how the interface looks. You can import Collection, cURL, WADL, RAML, Swagger files and run collections as well well.

Postman Interface (downloadable)

Wether you are writing the client-side or some server side coding, in Ruby, NodeJS, PHP etc.. this is a great tool that would do the fetch requests for you. Accepting and responding.

You can select a GET, POST PATCH or a DELETE request you would want to make, place in the corresponding URL in the section provided, specify body of the request if any and include the specific content type and value in headers if needed as well and just click send.

It is that easy. You can then get response and select the format of the response body type to be “pretty”, “raw”, “preview”. Additionally, you can access the cookies, headers and more.

The JSONplaceholder API is a great and simple fake REST API to use for web developers to practice requests, test prototypes, formats and handle responses. It is powered by JSON Server and It is accessible at“https://jsonplaceholder.typicode.com/“ .

Here is another example of the HTML response when I attempted to post to an api /assets parameters while using a wrong token. The response as Json format response looks like this: {“error”: “Empty/Invalid Token”}.

Api process

Here is the Processing being done by CryptosController which called the authenticate method.This tells us that the authenticate method worked.

Successful Login
Access Resources

Successful login when using appropriate token in headers.

Successful Login Server response

Logout and redirect to landing page

Using Postman I was able to access the resources when successfully authenticated.

Successful logout and redirected to Home page with limited access to Api resources.

Additionally, as you might have observed in the screen shot, you have access to details that can help you optimize your application such as how long an action took to perform and see the file size etc…

Postman is a great tool to test apis in development or production environment. It is easy to use and has a lot of tools build in available for testing apis for free.

Chrome Extension: https://chrome.google.com/webstore/detail/postman/fhbjgbiflinjbdggehcddcbncdddomop?hl=en .

--

--