<?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: Lawson Cheng</title>
    <description>The latest articles on DEV Community by Lawson Cheng (@lawson_cheng).</description>
    <link>https://dev.to/lawson_cheng</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%2F664040%2F1459f59d-fa71-4886-a585-2079c61dd463.jpg</url>
      <title>DEV Community: Lawson Cheng</title>
      <link>https://dev.to/lawson_cheng</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lawson_cheng"/>
    <language>en</language>
    <item>
      <title>Poke: A Super Handy HTTP Request Library</title>
      <dc:creator>Lawson Cheng</dc:creator>
      <pubDate>Tue, 13 Jul 2021 05:30:44 +0000</pubDate>
      <link>https://dev.to/lawson_cheng/poke-a-super-handy-http-request-library-1440</link>
      <guid>https://dev.to/lawson_cheng/poke-a-super-handy-http-request-library-1440</guid>
      <description>&lt;p&gt;'Request/request' was my favorite library all the time when i need to make http request in node, however it's deprecated for some time. &lt;/p&gt;

&lt;p&gt;I have tried a lot of alternatives but none of them gives me the similar experience as &lt;code&gt;request&lt;/code&gt; does.&lt;/p&gt;

&lt;p&gt;Finally, I decided to make one, that will be my pleasure to have you guy's feedback : )&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/LawsonCheng/poke"&gt;https://github.com/LawsonCheng/poke&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import poke from 'js.poke'

// Using promise
poke('https://httpbin.org/anything')
.promise()
.then(result =&amp;gt; {
    // response body here
    console.log(result.body)
    // get result in json format
    return result.json()
})
.then(json =&amp;gt; {
    // here is the json object
    console.log('json: ', json)
})
.catch(err =&amp;gt; {
    console.log('&amp;gt; Error: ', err)
})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>node</category>
      <category>javascript</category>
      <category>typescript</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
