![]() ![]() Check for Time (Response Time), it should be acceptable as per business.You have successfully tested your POST request too, Similarly you can try your hands with the other postman http methods - PUT, PATCH, DELETE etc. Also, check for the correct status code, in this case, you should get: ‘Status:201 Created’ Click on Body Tab and select “Raw” radio buttonħ.In the “Enter Request URL” text box, type :.POST Request - To make a POST request, click on New->Request->CreateUser(Any request name you wish)->Select the Collection you wish to save request in(Present in bottom of dialog box)->Save to Collection Demo The response can either be a success message or the id of the new user created and time when the user was created. In POST request we send data/parameter in the body of the request, and in response to that, API returns some data to us which validates the user has been created. For these type of requests we use POST request. Now, suppose we need to create a user into a application that means we are sending data or feeding data to an application. You should be delighted you have successfully tested your first API request. You should be able to see the below response in the Body section: response Bodyħ. In the “Enter Request URL” text box type :Ħ.By now, we have created our first request, now we need to pass different parameters in the request to get the expected response. ![]() Make a Request - To make a request, click on New->Request->GetUser(Any request name you wish)->Select the Collection you wish to save request in(Present in bottom of dialog box)->Save to Collection Demo.Make a collection in Postman - To make a collection in Postman, click on New->Collection->CollectionDemo(Any Collection Name you wish)->Create.For making the first HTTP method request in postman (GET): To test this we will have to use GET request. Let us assume we have a sample API for testing in postman, which fetches the user information of a particular application. Let’s now jump directly to test those API’s. How to write manual test cases for API testing using postman Testing GET Requests OPTIONS : The OPTIONS method describes the communication options for the target resource. DELETE : The DELETE method deletes the specified resource.ħ. HEAD transfers the status line and the header section only.Ħ. HEAD : HEAD is almost identical to GET, but without the response body. For instance, when you only need to update one field of the resource, PUTting a complete resource representation might be cumbersome and utilizes more bandwidth.ĥ. PATCH : PATCH is used to update partial resources. Replaces all the current representations of the target resource with the uploaded content.Ĥ. PUT : PUT is used to send data to a server to create/update a resource. POST : A POST request is used to send data to the server, for example, customer information, file upload, etc. Requests using GET should only retrieve data and should have no other effect on the data.Ģ. GET : The GET method is used to retrieve information from the given server using a given URI. The response contains status information about the request and may also contain the requested content. A web browser may be the client, and an application on a computer that hosts a website may be the server.Įxample: A client (browser) submits an HTTP request to the server then the server returns a response to the client. HTTP works as a request-response protocol between a client and a server. The Hypertext Transfer Protocol (HTTP) is designed to enable communications between clients and servers. Since we have installed the Postman app successfully, it is now time to start testing the API with Postman by making the first HTTP request to the server. Postman Dashboard Making the first HTTP request in Postman: Once installed Postman successfully, your postman window should look like this: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |