<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Joel Aldair Chan Tec</title>
    <description>The latest articles on DEV Community by Joel Aldair Chan Tec (@joelchan24).</description>
    <link>https://dev.to/joelchan24</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F459406%2Fd52584c6-37af-45d0-a150-5d5186fd239a.jpeg</url>
      <title>DEV Community: Joel Aldair Chan Tec</title>
      <link>https://dev.to/joelchan24</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/joelchan24"/>
    <language>en</language>
    <item>
      <title>Environments variables in Postman</title>
      <dc:creator>Joel Aldair Chan Tec</dc:creator>
      <pubDate>Wed, 06 Jan 2021 02:06:04 +0000</pubDate>
      <link>https://dev.to/joelchan24/environments-variables-in-postman-30ba</link>
      <guid>https://dev.to/joelchan24/environments-variables-in-postman-30ba</guid>
      <description>&lt;p&gt;hello everyone, first of all , this is my first post in dev.to and I'm going to share you some of my little knowledge and my experience as a junior Backend developer.&lt;br&gt;
today I'm going to talk about one tool that's is usefull named POSTMAN.&lt;br&gt;
what is postman?&lt;br&gt;
postman is a tool used to make REST API calls,however exist others tools like : insomia but is almost the same , these tools are very usefull.&lt;br&gt;
how to use postman?&lt;br&gt;
it is used to requests . you must have the URL and you should know what type of request you will do , only you must put the URL in the field named URL and make the request that the REST API is holding on&lt;br&gt;
&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fboak2573wdordydkz5k6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fboak2573wdordydkz5k6.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;the previous image show us how the make a basic call using postman without using environment variables and below I will show you how to do it using environment variables.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step One
&lt;/h3&gt;

&lt;p&gt;once being in post, find the button manage environment &lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fmxpb9nubbv1epzmhcd5s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fmxpb9nubbv1epzmhcd5s.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  step two
&lt;/h3&gt;

&lt;p&gt;now is time to create an environment &lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fj9evos84wh7r4q75g2pi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fj9evos84wh7r4q75g2pi.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
when we create an environment  then we have the ability to create several variables in the same environment but this time we are going to create an environment called &lt;strong&gt;develop&lt;/strong&gt; that will have variables in this case called url&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Frvpu2m1i5by77hrgmbjt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Frvpu2m1i5by77hrgmbjt.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we have an environment called &lt;strong&gt;develop&lt;/strong&gt; ready to be used.&lt;br&gt;
but when you have to test your API deployed on the web, you should to create another environment called production.&lt;/p&gt;

&lt;h3&gt;
  
  
  By last
&lt;/h3&gt;

&lt;p&gt;okay we have an environment but the question is &lt;strong&gt;how I use it ?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;How I said in the beginning postman is a powerful tool that allow us to use its tools easily.&lt;/p&gt;

&lt;p&gt;when we create an environment, it is automatic added to the following combo with all the created environments and to use it we just have to select our environment in this case called &lt;strong&gt;develop&lt;/strong&gt; &lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fmgfzlriehxo60mpdped1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fmgfzlriehxo60mpdped1.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally we just  have to call the  url variable that we create within the environment &lt;strong&gt;develop&lt;/strong&gt; and to call the variable we must do it inside double brackets &lt;br&gt;
example:&lt;br&gt;
&lt;code&gt;{{url}}/book&lt;/code&gt;&lt;br&gt;
its equals to&lt;br&gt;
&lt;code&gt;http://localhost:3000/book&lt;/code&gt;&lt;br&gt;
in post using url variable we will see something like the below&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Foflg1f76iam3i0v1ak3a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Foflg1f76iam3i0v1ak3a.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's all on my part, I hope It's helpful.&lt;br&gt;
Regards Joel.&lt;/p&gt;

</description>
      <category>postman</category>
      <category>restapi</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
