Developing APIs With The Help of POSTMAN, and a new class

I use POSTMAN to test API calls to my PHP code. It is a great tool. I can set up any type of HTTP request and run it over and over again, watching the responses. You can save these requests in a collection and come back and run them whenever you like.

I found myself in a situation where I needed to build an API for existing requests that were generated by existing web pages. I started by building the POSTMAN requests to match the actual requests that were being made. It became very tiresome, hence this project.

So what I can do now is :-

  1. Insert my class into the end point of an existing project
  2. Run the UI through all the pages
  3. Import the resulting log file into POSTMAN
  4. Inspect and run each of the requests in POSTMAN So that’s it.

This is the first release of the software. I’ve been using it for a month and I’ve found it very helpful. I hope you do too.

You can obtain the source from GitHub as follows.

https://github.com/gregambrose/ApiToPostman

Posted in PHP