From the course: Introducing Postman

Unlock the full course today

Join today to access over 22,700 courses taught by industry experts or purchase this course individually.

Provide examples

Provide examples - Postman Tutorial

From the course: Introducing Postman

Start my 1-month free trial

Provide examples

- [Instructor] In addition to basic documentation Postman allows us to provide example request and response bodies to help anyone consuming our APIs understand how to use them and what to expect in response. Request examples can be an invaluable resource as they describe how the API responds to a request given a variety of situations. Consider our authenticate request. When we provide valid credentials we expect the server to respond with a valid token. Similarly, when we send invalid credentials we expect the response to indicate a failure. We could include this information in the requests description, but it seems more useful to provide the exact request and response structures. Examples allows us to do just that. Examples can be created manually, which is useful when you need to capture how you expect something under development to behave when completed. Similarly, we can send requests for each expected result, then capture the requests and responses as examples of the request…

Contents