19.0: PostMan Tips
Postman and Swagger can get a little tricky every once in a while. It's important to understand what the endpoint requests intentions are.
GET -- A request to retrieve information. (Getting a note)
POST -- A request that the resource at the URI do something with the provided entity. (Create a note)
PUT -- A request to store an entity at a URI. (Update a note)
DELETE -- A request that a resource be removed; however, the resource does not have to be removed immediately. (Delete a note)
Also it is important to understand what your different status codes mean. Below is a list of the more common codes or you can check out even more at HTTP Dogs or HTTP Cats. Paying attention to these status codes can give you a better idea of how your code is working.
200 -- Ok
300 -- Multiple Choices
400 -- Bad Request
401 -- Unauthorized
403 -- Forbidden
404 -- Not Found
418 -- I'm a Teapot
500 -- Internal Server Error
502 -- Bad Gateway
503 -- Service Unavailable
504 -- Gateway Timeout
When Running Your Tests Make Sure That:
Your program is running.
Your API endpoint spelling matches that of your program and Postman.
Your HTTP request is correct. (GET, POST, PUT, DELETE)
Your Bearer tokens are always copied over correctly.
Last updated