<?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: Akinsanya Toluwanimi</title>
    <description>The latest articles on DEV Community by Akinsanya Toluwanimi (@akinsanya_toluwanimi_e409).</description>
    <link>https://dev.to/akinsanya_toluwanimi_e409</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%2F2524013%2F39e05657-c28a-4d3a-b560-25d263c0787e.jpg</url>
      <title>DEV Community: Akinsanya Toluwanimi</title>
      <link>https://dev.to/akinsanya_toluwanimi_e409</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/akinsanya_toluwanimi_e409"/>
    <language>en</language>
    <item>
      <title>HTTP METHODS AND STATUS CODES</title>
      <dc:creator>Akinsanya Toluwanimi</dc:creator>
      <pubDate>Fri, 31 Jan 2025 19:12:45 +0000</pubDate>
      <link>https://dev.to/akinsanya_toluwanimi_e409/http-methods-and-status-codes-1pj9</link>
      <guid>https://dev.to/akinsanya_toluwanimi_e409/http-methods-and-status-codes-1pj9</guid>
      <description>&lt;p&gt;&lt;strong&gt;What is HTTP&lt;/strong&gt; The Hypertext Transfer Protocol (HTTP) is the foundation of the World Wide Web, and is used to load webpages using hypertext links. HTTP is an application layer protocol designed to transfer information between networked devices and runs on top of other layers of the network protocol stack. A typical flow over HTTP involves a client machine making a request to a server, which then sends a response message.&lt;br&gt;
&lt;strong&gt;What is an HTTP METHOD&lt;/strong&gt;: An HTTP method, sometimes referred to as an HTTP verb, indicates the action that the HTTP request expects from the queried server. The most common HTTP methods are Get, Post, Put, Patch, Delete.&lt;br&gt;
&lt;strong&gt;GET&lt;/strong&gt;&lt;br&gt;
 The GET method is used to retrieve data from a server. It is one of the most commonly used HTTP methods.&lt;/p&gt;

&lt;p&gt;Here's an explanation of how the GET method works in Node.js:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The client (usually a web browser) sends a GET request to the server.&lt;/li&gt;
&lt;li&gt;The server receives the request and processes it.&lt;/li&gt;
&lt;li&gt;The server retrieves the requested data and sends it back to the client in the response body.&lt;/li&gt;
&lt;li&gt;The client receives the response and displays the data to the user.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;POST&lt;/strong&gt;&lt;br&gt;
The POST method is used to send data to a server to create or update a resource. Here's an explanation of how the POST method works in Node.js:&lt;/p&gt;

&lt;p&gt;How POST Requests Work&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The client (usually a web browser or a mobile app) sends a POST request to the server.&lt;/li&gt;
&lt;li&gt;The request body contains the data to be sent to the server.&lt;/li&gt;
&lt;li&gt;The server receives the request and processes it.&lt;/li&gt;
&lt;li&gt;The server creates or updates a resource based on the data sent in the request body.&lt;/li&gt;
&lt;li&gt;The server sends a response back to the client, usually with a status code of 201 Created or 200 OK.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;PUT&lt;/strong&gt;&lt;br&gt;
The PUT method is used to update an existing resource on the server. &lt;br&gt;
Here's an explanation of how the PUT method works in Node.js:&lt;/p&gt;

&lt;p&gt;How PUT Requests Work&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The client (usually a web browser or a mobile app) sends a PUT request to the server.&lt;/li&gt;
&lt;li&gt;The request body contains the updated data for the resource.&lt;/li&gt;
&lt;li&gt;The server receives the request and processes it.&lt;/li&gt;
&lt;li&gt;The server updates the existing resource with the new data.&lt;/li&gt;
&lt;li&gt;The server sends a response back to the client, usually with a status code of 200 OK or 204 No Content.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;PATCH&lt;/strong&gt;&lt;br&gt;
The PATCH method is used to partially update an existing resource on the server. It is similar to the PUT method, but instead of replacing the entire resource, it only updates the specified fields.&lt;/p&gt;

&lt;p&gt;How PATCH Requests Work&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The client (usually a web browser or a mobile app) sends a PATCH request to the server.&lt;/li&gt;
&lt;li&gt;The request body contains the updated fields for the resource.&lt;/li&gt;
&lt;li&gt;The server receives the request and processes it.&lt;/li&gt;
&lt;li&gt;The server updates the existing resource with the new data.&lt;/li&gt;
&lt;li&gt;The server sends a response back to the client, usually with a status code of 200 OK or 204 No Content.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;DELETE&lt;/strong&gt;&lt;br&gt;
The DELETE method is used to delete a resource from the server. Here's an explanation of how the DELETE method works in Node.js:&lt;/p&gt;

&lt;p&gt;How DELETE Requests Work&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The client (usually a web browser or a mobile app) sends a DELETE request to the server.&lt;/li&gt;
&lt;li&gt;The request URL specifies the resource to be deleted.&lt;/li&gt;
&lt;li&gt;The server receives the request and processes it.&lt;/li&gt;
&lt;li&gt;The server deletes the specified resource.&lt;/li&gt;
&lt;li&gt;The server sends a response back to the client, usually with a status code of 200 OK or 204 No Content.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;What’s an HTTP status code?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;HTTP status codes are 3-digit codes most often used to indicate whether an HTTP request has been successfully completed. Status codes are broken into the following 5 blocks:&lt;/p&gt;

&lt;p&gt;1xx Informational&lt;br&gt;
2xx Success&lt;br&gt;
3xx Redirection&lt;br&gt;
4xx Client Error&lt;br&gt;
5xx Server Error&lt;br&gt;
The “xx” refers to different numbers between 00 and 99.&lt;/p&gt;

&lt;p&gt;Status codes starting with the number ‘2’ indicate a success. For example, after a client requests a webpage, the most commonly seen responses have a status code of ‘200 OK’, indicating that the request was properly completed.&lt;/p&gt;

&lt;p&gt;If the response starts with a ‘4’ or a ‘5’ that means there was an error and the webpage will not be displayed. A status code that begins with a ‘4’ indicates a client-side error (it is very common to encounter a ‘404 NOT FOUND’ status code when making a typo in a URL). A status code beginning in ‘5’ means something went wrong on the server side. Status codes can also begin with a ‘1’ or a ‘3’, which indicate an informational response and a redirect, respectively.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>TEMPLATE LITERALS</title>
      <dc:creator>Akinsanya Toluwanimi</dc:creator>
      <pubDate>Tue, 21 Jan 2025 23:31:36 +0000</pubDate>
      <link>https://dev.to/akinsanya_toluwanimi_e409/template-literals-f8h</link>
      <guid>https://dev.to/akinsanya_toluwanimi_e409/template-literals-f8h</guid>
      <description>&lt;p&gt;Liquid syntax error: Variable '{{% raw %}' was not properly terminated with regexp: /\}\}/&lt;/p&gt;
</description>
    </item>
    <item>
      <title>What is the difference between var, let and const in JavaScript?</title>
      <dc:creator>Akinsanya Toluwanimi</dc:creator>
      <pubDate>Thu, 05 Dec 2024 13:02:16 +0000</pubDate>
      <link>https://dev.to/akinsanya_toluwanimi_e409/what-is-the-difference-between-var-let-and-const-in-javascript-19pe</link>
      <guid>https://dev.to/akinsanya_toluwanimi_e409/what-is-the-difference-between-var-let-and-const-in-javascript-19pe</guid>
      <description>&lt;p&gt;Var, let and const are used to declare a variables  in JavaScript. A variable is a container that holds a value.&lt;br&gt;
DIFFERENCE BETWEEN VAR, LET AND CONST.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Var has a function scope: this mean the variable is accessible throughout the entire functions regardless of the block it's in.
Let has a blocked scope: this means that the variable is only accessible within the block it's declared it. This is the same with Const.&lt;/li&gt;
&lt;li&gt;Var allows re-assignment of the same variable multiple times within the same scope
Let does not allow re-assignment of the same variable within the same scope
Const does not allow re-assignment of the same variable within the same scope&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Why is it recommended to const for JavaScript &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;In const a variable declared cannot be re-assigned.This helps prevent unintended changes to the variable assigned.&lt;/li&gt;
&lt;li&gt;Prevents accidental re-assignment.&lt;/li&gt;
&lt;/ol&gt;

</description>
    </item>
  </channel>
</rss>
