<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Myhkas Nallas on Medium]]></title>
        <description><![CDATA[Stories by Myhkas Nallas on Medium]]></description>
        <link>https://medium.com/@mmyhkas?source=rss-833c1c458a35------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*3aeCW1wR0OMK_wuc</url>
            <title>Stories by Myhkas Nallas on Medium</title>
            <link>https://medium.com/@mmyhkas?source=rss-833c1c458a35------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 22:11:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mmyhkas/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Test your Restful APIs using Postman]]></title>
            <link>https://medium.com/@mmyhkas/test-your-restful-apis-using-postman-5a9e523a5522?source=rss-833c1c458a35------2</link>
            <guid isPermaLink="false">https://medium.com/p/5a9e523a5522</guid>
            <category><![CDATA[postman]]></category>
            <category><![CDATA[testing-tools]]></category>
            <category><![CDATA[restful-api]]></category>
            <category><![CDATA[crud]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Myhkas Nallas]]></dc:creator>
            <pubDate>Tue, 11 Aug 2020 05:57:46 GMT</pubDate>
            <atom:updated>2020-08-11T05:57:46.795Z</atom:updated>
            <content:encoded><![CDATA[<p>Are you tired of having to build a client side to test your APIs? Let me introduce you to Postman! Postman is a collaboration platform for API development. It allows you to improve and speed up the process of building and developing APIs. In this tutorial, we will be using JavaScript, mySQL, and NodeJS(express for server) to demonstrate the power of Postman as your development tool. We will go through the step by step process starting from how to install Postman to testing your APIs using Postman.</p><h3><strong>How to Install Postman</strong></h3><ul><li><strong>Mac</strong></li></ul><ol><li>To install Postman, you’ll first need to download the software from this link: <br><a href="https://www.postman.com/downloads/">https://www.postman.com/downloads/</a></li><li>Unzip Postman-osx-X.XX.X.zip then run Postman. Move the Postman to Applications folder.</li><li>You may sign-in to the application or skip the sign in process as well (select light text in the bottom)</li></ol><ul><li><strong>Windows</strong></li></ul><ol><li>To install Postman, you’ll first need to download the software from this link:<br><a href="https://www.postman.com/downloads/">https://www.postman.com/downloads/</a></li><li>Once downloaded, run the setup.exe file</li><li>You may sign-in to the application or skip the sign in process as well (select light text in the bottom).</li></ol><h3>Explore Postman</h3><p><em>Now that we have Postman installed, we will now explore the basic functionalities of Postman.</em></p><ul><li><strong>Types of Request</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/346/1*opGnXx9WN7N2tHkdfoyakw.png" /></figure><p>Depending on your API you created, you can choose what type of request you are testing. By selecting the dropdown arrow, you can choose your request type. There are multiple options there, but for this tutorial, we will go through the most used ones, GET, POST, PUT/PATCH, and DELETE.</p><ul><li><strong>URL and Send</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o7gbIyMeTBcIaCfJliZOJA.png" /></figure><p>Right next to the type of request, there is a URL input. This is where you will provide the URL of your app, server, and endpoints needed for your API request. As long as you know what type of request you are targeting, you can input any URL there and you will get a result. For example, you can do a GET request and type in “google.com” on URL and you will get some sort of result. It might not make a lot of sense, but it gives a glimpse on how Postman works.</p><ul><li><strong>Body and Params</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5NAtQmXcYG3NX6sThKHcvg.png" /></figure><p>For API requests that require some sort of input or data from the client, here’s where the Params and Body comes to play. Depending on your API requests objective, you can select between Params and Body. When using Params, every time you add a key and value, that will append to your URL that you are using. A body on the other hand will not expose your key and value on your URL.</p><h3><strong>Basic CRUD code and </strong>Testing endpoints</h3><p><em>We will be using this sample code to test some API using Postman. Keep in mind Express was used to run the server for this application in order to communicate to Postman. Feel free to clone my repo. Make sure to install all dependencies.</em></p><p>GitHub repo: <a href="https://github.com/mnallas/Todo-App">https://github.com/mnallas/Todo-App</a></p><p>For this tutorial we will be testing a CRUD functionality that will cover the following types of requests. I’ll show a few examples that we can test and analyze. We are running the server locally and have the URL set to:</p><p><a href="http://localhost:${PORT}">http://localhost:${PORT}</a><br><em>You can set the PORT to whatever works for you. For this tutorial, we will use 3000 as the PORT.</em></p><h4>GET request code</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*K0gMY_r5aSox0rmYHrVknQ.png" /></figure><ol><li>On Postman, set Request type to GET.</li><li>Provide the URL + the endpoint you created for your request on the URL field.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/1*0EzU3NHMAoPfkeJcmZVA2A.png" /></figure><p><em>Since the code doesn’t require anything, you can leave the body/params fields empty. Select Send to get result.</em></p><p><em>Result:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/1*S89QIUasI7dO8TKZFlj8oA.png" /><figcaption>objects will vary depending on what you have on your database</figcaption></figure><h4><strong>POST Request code</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q9aA6iM46Gquozu79WphEg.png" /></figure><ol><li>On Postman, set Request type to POST.</li><li>Provide the URL + the endpoint you created for your request on the URL field.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/576/1*yVQ9FQjU3SItsdyipw3ETA.png" /></figure><p>3. Since this is a POST request, we will need to provide a key and value on Body. For this code, it is requiring a value for todo. Select Send for result.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6wAH5dx7a8e8QXQlBhShSA.png" /></figure><p><em>Result:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/888/1*JbH7dT_LfHwJ-_gGzfXiHg.png" /><figcaption>As per code, the response will be a success message.</figcaption></figure><h4>PUT/PATCH request code</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j9aSA_mjLykmuZ9TNxyZbg.png" /></figure><ol><li>On Postman, set Request type to PATCH.</li><li>Provide the URL + the endpoint you created for your request on the URL field.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*n7Fyg-yjuwz69LKCJih68g.png" /></figure><p>3. Since this is a PATCH request, we will need to provide a key and value on Body that you would like to be changed. For this code, it is requiring a value for keys: todoText, todoId (object you are targeting), and todoCompleted. Select Send for result.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yVSsqZNKdd1df8Px6PhOag.png" /></figure><p><em>Result:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/884/1*-doG9_HjcEKYzpqADPjVQw.png" /><figcaption>As per code, the response will be a success message.</figcaption></figure><h4>DELETE request code</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PV-oLjp6JbMlphVAXsiHXA.png" /><figcaption>adding /:id indicates that endpoint requires a query/parameter</figcaption></figure><ol><li>On Postman, set Request type to DELETE.</li><li>Provide the URL + the endpoint you created for your request on the URL field.</li><li>Since this is a DELETE request, we will need to provide a parameter for the id which will target the object we want to delete. For this, sample we will delete the object that has the id =1. will Select Send for result.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*ce1Q5C5xQkMMsa797piJYg.png" /></figure><p><em>Result:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*jAVGHZ64W4s4U8NFnz8pPQ.png" /><figcaption>As per code, the response will be a “Todo deleted” message.</figcaption></figure><p>Now that you have learnt this, you will save enormous amounts of time testing your code before handling the front end of your website. There are more cool functionalities Postman has to offer. Stay curious and start coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5a9e523a5522" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>