Easy POST-requests for testing REST-interface

For a course we had to implement a service composition that communicated over REST interfaces using spring boot. Part of this was to allow not only GET-request, to retrieve information from the service, but also to allow POST-request, which would enable the user to add information to the service. We faced a problem when testing our implementation. While testing the GET-request is very easy, POST-request contain information in the body and we didn’t know how to properly simulate this without a lot of effort. The simple solution for this is the Google Chrome plugin “Postman”. While capable of sending normal GET-requests, it allows to easily make POST-request where you add information to the post-body.

Comments

Very nice knowledge sharing and very good answer. Postman is great tool build exactly for this reason. I personally use it and definitely agree that it's must have for every REST-API developer. Postman also has native applications for Windows, Linux and MacOS.
Boian Velitchkov - Sun, 12/02/2018 - 21:28 :::
Yes, Postman is pure gold for every web developer. When using the native apps it's also possible to create and share with your team whole test collections, enabling everyone on the team to better understand the REST endpoints that are being used.
Artur Marcin Sz... - Sun, 12/09/2018 - 19:18 :::
No answers yet.