<?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: Ibiyemi convenat</title>
    <description>The latest articles on DEV Community by Ibiyemi convenat (@ibiyemi_convenat_f126bfb4).</description>
    <link>https://dev.to/ibiyemi_convenat_f126bfb4</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%2F2487480%2Feda21afe-7242-4eeb-ad98-2adf550443d3.png</url>
      <title>DEV Community: Ibiyemi convenat</title>
      <link>https://dev.to/ibiyemi_convenat_f126bfb4</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ibiyemi_convenat_f126bfb4"/>
    <language>en</language>
    <item>
      <title>Express request types</title>
      <dc:creator>Ibiyemi convenat</dc:creator>
      <pubDate>Mon, 16 Dec 2024 09:54:14 +0000</pubDate>
      <link>https://dev.to/ibiyemi_convenat_f126bfb4/express-request-types-f5f</link>
      <guid>https://dev.to/ibiyemi_convenat_f126bfb4/express-request-types-f5f</guid>
      <description>&lt;p&gt;In Express.js, a request refers to the HTTP request made by the client to the server. Express provides a request object  that contains all the details about the incoming request, such as headers, query parameters, body data, and more.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;req.params&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Used to access route parameters from the URL.&lt;/p&gt;

&lt;p&gt;Example: /user/:id&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;req.query&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Used to access query string parameters in the URL.&lt;/p&gt;

&lt;p&gt;Example: /search?term=express&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;req.body&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Contains data sent in the request body (e.g., for POST or PUT requests).&lt;/p&gt;

&lt;p&gt;Requires middleware like express.json() &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;req.headers&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Contains the headers sent by the client.&lt;/p&gt;

&lt;p&gt;Access a specific header via req.headers['header-name'].&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;req.method&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The HTTP method of the request (e.g., GET, POST).&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;req.url&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The full URL path of the request.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;req.path&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The path part of the URL.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;req.cookies&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Contains cookies sent by the client &lt;/p&gt;

&lt;p&gt;Example: Handling Requests&lt;/p&gt;

&lt;p&gt;const express = require('express');&lt;br&gt;
const app = express();&lt;/p&gt;

&lt;p&gt;Middleware for Parsing Request Data&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Body Parsing:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;JSON: app.use(express.json())&lt;/p&gt;

&lt;p&gt;URL-encoded: app.use(express.urlencoded({ extended: true }))&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Cookies:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Install and use cookie-parser middleware:&lt;/p&gt;

&lt;p&gt;const cookieParser = require('cookie-parser');&lt;br&gt;
app.use(cookieParser());&lt;/p&gt;

&lt;p&gt;Testing Requests&lt;/p&gt;

&lt;p&gt;Use tools like Postman to test different types of requests. For example:&lt;/p&gt;

&lt;p&gt;GET Request:&lt;/p&gt;

&lt;p&gt;http//:Localhost/dashboard &lt;/p&gt;

&lt;p&gt;POST Request:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://localhost:3000/login" rel="noopener noreferrer"&gt;http://localhost:3000/login&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;All this request object  that contains all the details above  such as headers****, query parameters, body data are all request to get a object from a server &lt;/p&gt;

</description>
      <category>express</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Synchronously and Asynchronously</title>
      <dc:creator>Ibiyemi convenat</dc:creator>
      <pubDate>Tue, 03 Dec 2024 12:26:34 +0000</pubDate>
      <link>https://dev.to/ibiyemi_convenat_f126bfb4/synchronously-and-asynchronously-374b</link>
      <guid>https://dev.to/ibiyemi_convenat_f126bfb4/synchronously-and-asynchronously-374b</guid>
      <description>&lt;p&gt;In JavaScript, synchronous and asynchronous define how code is executed and tasks are managed.&lt;/p&gt;

&lt;p&gt;Synchronous (Sync)&lt;/p&gt;

&lt;p&gt;Executes tasks one at a time in a linear sequence.&lt;/p&gt;

&lt;p&gt;Blocks subsequent tasks until the current task is complete.&lt;br&gt;
Example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fiznnnnu78335rd6ymxec.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fiznnnnu78335rd6ymxec.png" alt="Image description" width="634" height="482"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Asynchronous (Async)&lt;/p&gt;

&lt;p&gt;Executes tasks concurrently without blocking.&lt;/p&gt;

&lt;p&gt;Allows other tasks to run while waiting for time-consuming operations.&lt;br&gt;
Example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F93vvjiilk0ly2ry0iamo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F93vvjiilk0ly2ry0iamo.png" alt="Image description" width="800" height="456"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Key Differences&lt;/p&gt;

&lt;p&gt;Blocking: Sync code blocks further execution; async code doesn't.&lt;/p&gt;

&lt;p&gt;Concurrency: Async handles multiple tasks simultaneously; sync executes sequentially.&lt;/p&gt;

&lt;p&gt;Callbacks: Async tasks use callbacks to handle results.&lt;/p&gt;

&lt;p&gt;Understanding these concepts is essential for building efficient and responsive JavaScript applications.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Variable in JavaScript</title>
      <dc:creator>Ibiyemi convenat</dc:creator>
      <pubDate>Tue, 26 Nov 2024 16:39:35 +0000</pubDate>
      <link>https://dev.to/ibiyemi_convenat_f126bfb4/variable-in-javascript-2ilo</link>
      <guid>https://dev.to/ibiyemi_convenat_f126bfb4/variable-in-javascript-2ilo</guid>
      <description>&lt;p&gt;Variables act as containers for storing data values, which can change or remain constant depending on the program's logic.&lt;br&gt;
It's A unique identifier to access the stored value (e.g., x, name, age).&lt;/p&gt;

&lt;p&gt;Purpose of Variables&lt;br&gt;
&lt;a href="https://media2.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%2Fkghh8yfagvztystos9da.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fkghh8yfagvztystos9da.png" alt="Image description" width="800" height="372"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Store Data: Keep data in memory for calculations or processing.&lt;/p&gt;

&lt;p&gt;Reuse Data: Access the stored value multiple times without needing to re-enter it.&lt;/p&gt;

&lt;p&gt;Dynamic Updates: Allow the value to be updated as the program runs.&lt;/p&gt;

&lt;p&gt;Readable Code: Improve program readability and maintainability by using descriptive names.&lt;/p&gt;

&lt;p&gt;How Variables Work&lt;/p&gt;

&lt;p&gt;When you declare a variable, the computer reserves a memory location.&lt;/p&gt;

&lt;p&gt;The variable name refers to that memory location, so you can retrieve or update its value.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
