Home | License | FAQ | Contact | Smart-API

Microservice API Testing using Postman:

Pre-Requisite:

Steps:

1.Open Postman click on new.

postman-home-screen
Figure 1. postman home screen

2.Click on HTTP request.

http-request
Figure 2. new HTTP request

3.GET request without parameter.

http-page
Figure 3. http request page

a.Select "GET"
b.Enter url (e.g."http://localhost:8080/app/example/hello")
c.Click on send

get-without-parameter
Figure 4. http GET request without parameter

See the output in figure 4.

4.GET with parameter

a.Select "GET"
b.Enter url (e.g."http://localhost:8080/app/example/hello/yourName")
c.Click on send

get-with-parameter
Figure 5. http GET request with parameter

See the output in figure 5.

Make sure you use get "http://localhost:8080/app/example/hello/{name}".

5.Using json "POST"

a.Select "POST"
b.Enter url (e.g."http://localhost:8080/app/example/hello")

change-to-post
Figure 6. Using json "POST"

c.Select Body ⇒ raw ⇒ JSON

post-json
Figure 7. select JSON
post-john.png
Figure 8. example json string

d.Enter JSON string (e.g. {"name":"John", "age":30} )

e.Click on send

post-json-done
Figure 9. output json "post"

See the output in figure 9.


Home | License | FAQ | Contact | Smart-API