<?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: Yatharth Nigam</title>
    <description>The latest articles on DEV Community by Yatharth Nigam (@yatharthnigam).</description>
    <link>https://dev.to/yatharthnigam</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%2F700770%2Fe00c39dd-bf9d-4978-9c26-60de0a10fc3e.jpg</url>
      <title>DEV Community: Yatharth Nigam</title>
      <link>https://dev.to/yatharthnigam</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yatharthnigam"/>
    <language>en</language>
    <item>
      <title>Using Mergify to automate merging Pull Requests.</title>
      <dc:creator>Yatharth Nigam</dc:creator>
      <pubDate>Wed, 31 Aug 2022 05:42:49 +0000</pubDate>
      <link>https://dev.to/yatharthnigam/using-mergify-to-automate-merging-pull-requests-3pbe</link>
      <guid>https://dev.to/yatharthnigam/using-mergify-to-automate-merging-pull-requests-3pbe</guid>
      <description>&lt;h1&gt;
  
  
  TABLE OF CONTENTS
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Introduction&lt;/li&gt;
&lt;li&gt;Mergify&lt;/li&gt;
&lt;li&gt;Features&lt;/li&gt;
&lt;li&gt;Automatic merges&lt;/li&gt;
&lt;li&gt;Merge Queue&lt;/li&gt;
&lt;li&gt;Installing&lt;/li&gt;
&lt;li&gt;Configuration&lt;/li&gt;
&lt;li&gt;Example&lt;/li&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Merging code into a branch can be a really time-consuming task, especially on large projects with many developers, or if you have a large number of Pull Requests that have to be reviewed, approved, and merged in the correct order. Also, if before your PR gets merged, other PRs get merged to main then your PR gets outdated. Then GitHub's CI tests will take place and if they get passed then we'll have to click on merge to get the PR merged. This can also be automated using Mergify. Pretty cool right!! So, in this blog, we'll be learning what Mergify is and how we can get started with it and use it to make our lives easier as a developer.&lt;/p&gt;

&lt;p&gt;If you are more into visual learning, Do check out this video from Kunal Kushwaha:-&lt;br&gt;
&lt;a href="https://youtu.be/Xw3dFKNONmw"&gt;Video&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Mergify
&lt;/h2&gt;

&lt;p&gt;Mergify is a tool that helps prioritize, queuing, and automatically merge your pull requests. It can also rebase and update your branches while commenting, labeling, assigning, and closing your pull requests. In simple terms, Mergify is a GitHub pull request automation tool with a merge tool. But there's a lot more to it that it can do. The best part is you don't need to learn any other technology, it gets integrated into GitHub.&lt;/p&gt;
&lt;h2&gt;
  
  
  Features
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Automatic merges
&lt;/h3&gt;

&lt;p&gt;You can customize automatic merge behavior and once that criteria/conditions such as CI tests pass, your PRs will be merged automatically. This can be done by describing your pull request conditions in a YAML file. You can match any pull request based on any criteria.&lt;/p&gt;
&lt;h3&gt;
  
  
  Merge Queue
&lt;/h3&gt;

&lt;p&gt;As I explained about outdated PRs in the introduction. You should not merge outdated PRs and it can be time-consuming to keep the PRs up to date. This is where the merge queue comes into the picture. Your pull requests are merged serially and tested by your CI one after the other, avoiding code regression.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When multiple pull requests are mergeable, they are scheduled to be merged sequentially, and are updated on top of each other. The pull request branch update is only done when the pull request is ready to be merged by the engine, for example when all conditions are validated.&lt;/li&gt;
&lt;li&gt;That means that when a first pull request has been merged, and the second one is outdated like you can see in this image, Mergify will make sure that pull request 2 is updated with the latest tip of the base branch before merging.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Installing
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;First, we need to login into Mergify and allow access to our Github repository. This should install Mergify in our Github account.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qDLGpPEE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/np85hrhr33o4rfo77dfm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qDLGpPEE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/np85hrhr33o4rfo77dfm.png" alt="Mergify dashboard" width="880" height="454"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click on Enable Mergify and then select all repositories or any specific repository as per your requirement.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HJlx_Enc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8uo2y2vy40dzlil39ry0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HJlx_Enc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8uo2y2vy40dzlil39ry0.png" alt="Adding to GitHub repo." width="880" height="457"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now, you'll be seeing a dashboard. Here you can manage your selected repositories, write configuration files (write rules and then actions associated with them), merge queues, and many more.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CCIK15NJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hzysf5wp7um1cm306m3v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CCIK15NJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hzysf5wp7um1cm306m3v.png" alt="Dashboard after connection to github account." width="880" height="455"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now, in order to connect your repository with Mergify in order to apply all the rules and actions you define, create a Mergify configuration in each repository where Mergify is used.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The configuration file should be created in the root directory of the repository and named either .mergify.yml or .mergify/config.yml or .github/mergify.yml. As the file name implies, the configuration file format is based on YAML, a simplistic file format for data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--muJFp-0u--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zbfzzz2vmdlqkuxqjirq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--muJFp-0u--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zbfzzz2vmdlqkuxqjirq.png" alt="Creating .yml file." width="880" height="458"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Configuration
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://docs.mergify.com/configuration/#configuration-file-format"&gt;Configuration file documentation&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can get started by using the code in Config Editor in Mergify.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pull_request_rules:
  - name: Automatic merge on approval
    conditions:
      - "#approved-reviews-by&amp;gt;=1"
    actions:
      merge:
        method: merge
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It consists of:-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Name of your rule explaining what the rule does.&lt;/li&gt;
&lt;li&gt;Conditions to be checked and verified for the action to take place.&lt;/li&gt;
&lt;li&gt;Actions that will take place upon verification of the conditions.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Example
&lt;/h2&gt;

&lt;p&gt;Let's see an example. We'll try the merge configuration written above which &lt;strong&gt;automatically merges the pull request if one or more reviewers approve the pull request.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--D-hjftff--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nksmnn4rvt0zxv5lsyir.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--D-hjftff--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nksmnn4rvt0zxv5lsyir.png" alt="Writing config file in repo." width="880" height="460"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Here, you can see a pull request that has been raised.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TU58BrOv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ppzu0o360fozuvxoxt13.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TU58BrOv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ppzu0o360fozuvxoxt13.png" alt="Raised pull request." width="880" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I'll just approve the pull request.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--J2NQQKVd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k2dcef0z72utu39oku9o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--J2NQQKVd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k2dcef0z72utu39oku9o.png" alt="Approving merge request." width="880" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Voila! the Mergify bot automatically merges the pull request.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4Sc41LbY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5ht1zue1yp0yugexq9n3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4Sc41LbY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5ht1zue1yp0yugexq9n3.png" alt="Pull request automatically merged." width="880" height="430"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can also auto-assign reviewers based on the type of file changed. Example: If python files and modified in the PR then assign them to person A, if java files are changed, assign it to person B, and so on.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pull_request_rules:
  - name: assign PRs with Python files modified to Rishwanth
    conditions:
      - "check-success=ci/circleci: validate"
      - files~=\.python$
    actions:
      assign:
          add_users:
              - rishwanthram
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is just a small example among the endless amazing things that Mergify can do. Here is a list of actions that you can perform using Mergify.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1ncxI-pm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mq98ga63pw9y5t07h0to.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1ncxI-pm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mq98ga63pw9y5t07h0to.png" alt="Mergify actions." width="880" height="605"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In this blog, you have learned how to get started with Mergify. Mergify is a great tool that can help in the automation when working with version control systems and save a lot of time. I hope you learned something from this blog and will try Mergify. You can go to Mergify to read the &lt;a href="https://docs.mergify.com/"&gt;official documentation&lt;/a&gt; and learn more about it.&lt;/p&gt;

&lt;p&gt;PS: I've posted this blog on HashNode as well. If you like it, do upvote it in HashNode that'll be helpful. &lt;a href="https://yatharthnigam.hashnode.dev/using-mergify-to-automate-merging-pull-requests"&gt;Link&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks For Reading!&lt;/p&gt;

</description>
      <category>devops</category>
      <category>productivity</category>
      <category>github</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Using Axios with React to Make API Requests</title>
      <dc:creator>Yatharth Nigam</dc:creator>
      <pubDate>Tue, 23 Nov 2021 08:22:55 +0000</pubDate>
      <link>https://dev.to/yatharthnigam/using-axios-with-react-to-make-api-requests-2jn2</link>
      <guid>https://dev.to/yatharthnigam/using-axios-with-react-to-make-api-requests-2jn2</guid>
      <description>&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;I was working on a project that uses React and Material UI. For this project, I needed to fetch data from the server and I encountered some difficulties trying to fetch data from API. After some research and practice, I understood the concept and was able to fetch data using Axios.&lt;br&gt;
So I've written this post to get you started with basics of Axios.&lt;br&gt;
At the end of this article, you will be able to get data from a server.&lt;/p&gt;
&lt;h3&gt;
  
  
  Axios
&lt;/h3&gt;

&lt;p&gt;Axios is a simple promise based HTTP client for the browser and node.js. Axios provides a simple to use library in a small package with a very extensible interface.&lt;br&gt;
Axios is a Promised-based JavaScript library that is used to send HTTP requests. You can think of it as an alternative to JavaScript's native fetch() function.&lt;/p&gt;
&lt;h3&gt;
  
  
  Features
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Make XMLHttpRequests from the browser&lt;/li&gt;
&lt;li&gt;Make http requests from node.js&lt;/li&gt;
&lt;li&gt;Supports the Promise API&lt;/li&gt;
&lt;li&gt;Intercept request and response&lt;/li&gt;
&lt;li&gt;Transform request and response data&lt;/li&gt;
&lt;li&gt;Cancel requests&lt;/li&gt;
&lt;li&gt;Automatic transforms for JSON data&lt;/li&gt;
&lt;li&gt;Client side support for protecting against XSRF&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Installing
&lt;/h3&gt;

&lt;p&gt;Using npm:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ npm install axios
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using yarn:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ yarn add axios
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Where do we make http request?
&lt;/h3&gt;

&lt;p&gt;In a class based component, requests are made in componentDidMount() lifecycle while in a functional component, requests are made in react lifecycle hooks i.e. useEffect.&lt;br&gt;
Axios supports several request methods such as get, post, delete, put, etc.&lt;br&gt;
Our major focus will be on get and post method which is commonly used.&lt;/p&gt;
&lt;h3&gt;
  
  
  Fetching data in Axios using the Get method
&lt;/h3&gt;

&lt;p&gt;Axios offers a get method with at least one argument (url).&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;axios.get('url')
.then(response =&amp;gt; {
console.log(response);
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Axios uses promises and get returns a promise 'then' which is a method which takes a function as the input and the function will get executed once the promise resolves, that is when the data from the server is there.&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%2Fuploads%2Farticles%2Fdvwrccyol0rkcjm9p0k7.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%2Fuploads%2Farticles%2Fdvwrccyol0rkcjm9p0k7.png" alt="Fetch using promise"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The above code is a simple API fetch using axios. Now, let's explain:&lt;/p&gt;

&lt;p&gt;Axios uses promises. get returns a promise 'then' which is a method which takes a function as the input and the function will get executed once the promise resolves, i.e. when the data from the server is there.&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%2Fuploads%2Farticles%2F7f3ru1lupa1vl6xwskdy.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%2Fuploads%2Farticles%2F7f3ru1lupa1vl6xwskdy.png" alt="Calling in useEffect"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the code, we create an arrow function where the fetched data from the server is passed in into a variable called getApi and called it in the lifecycle hooks. The second parameter [ ] empty array was passed so that the lifecycle hooks runs just once.&lt;/p&gt;

&lt;p&gt;Among the response gotten back from the API, we only need to the data, that is why we stored response.data is passed in the state.&lt;/p&gt;

&lt;p&gt;The output will be:&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%2Fuploads%2Farticles%2Fiqlzk7snoms84loer5hg.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%2Fuploads%2Farticles%2Fiqlzk7snoms84loer5hg.png" alt="Output in console"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Error Handling
&lt;/h3&gt;

&lt;p&gt;If we make any error in the URL or in the syntax, how we'll handle that error.&lt;/p&gt;

&lt;p&gt;To handle this error, add a catch method which catches any error you get, after the then method.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.catch ((error) {
console.log(error)
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Fetch data from the server using the async/await function
&lt;/h3&gt;

&lt;p&gt;To use the async/await syntax, we need to wrap the axios.get() function call within an async function. We encase the method call with a try…catch block so that we can capture any errors. The variable “response” that receives the http data had to use await to ensure the asynchronous data was received before continuing.&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%2Fuploads%2Farticles%2Floep98ok24goulwszlzd.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%2Fuploads%2Farticles%2Floep98ok24goulwszlzd.png" alt="Fetch using async/await"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;In this post, you have learned how to make http requests to the server using axios and we have been able to get data from server using both promise and async/await. I am sure this article has made you axios journey a nice one. You can got to &lt;a href="https://axios-http.com/" rel="noopener noreferrer"&gt;Axios&lt;/a&gt; to read the official documentation and learn more about it.&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
