<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>HTTP Server on AI VOID</title><link>https://ai-blog.noorshomelab.dev/tags/http-server/</link><description>Recent content in HTTP Server on AI VOID</description><generator>Hugo</generator><language>en</language><lastBuildDate>Sat, 25 Oct 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://ai-blog.noorshomelab.dev/tags/http-server/index.xml" rel="self" type="application/rss+xml"/><item><title>Guided Project 2: Simple HTTP Server with Axum</title><link>https://ai-blog.noorshomelab.dev/rust-guide/project-http-server-axum/</link><pubDate>Sat, 25 Oct 2025 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/rust-guide/project-http-server-axum/</guid><description>&lt;h1 id="guided-project-2-simple-http-server-with-axum"&gt;Guided Project 2: Simple HTTP Server with Axum&lt;/h1&gt;
&lt;p&gt;In this project, you&amp;rsquo;ll build a simple web server using &lt;code&gt;Axum&lt;/code&gt;, a popular web framework built on top of &lt;code&gt;Tokio&lt;/code&gt; and &lt;code&gt;hyper&lt;/code&gt;. This project will demonstrate:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Asynchronous programming (&lt;code&gt;async&lt;/code&gt;/&lt;code&gt;await&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;HTTP request and response handling.&lt;/li&gt;
&lt;li&gt;Routing.&lt;/li&gt;
&lt;li&gt;State management in web applications.&lt;/li&gt;
&lt;li&gt;Working with JSON data in web APIs.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Our server will have two endpoints:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;GET /&lt;/code&gt;: A simple &amp;ldquo;Hello, World!&amp;rdquo; greeting.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;POST /echo&lt;/code&gt;: Echoes back the JSON body it receives.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;GET /count&lt;/code&gt;: Returns the current value of a shared counter.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;POST /increment&lt;/code&gt;: Increments the shared counter.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="project-setup"&gt;Project Setup&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Create a new binary project:&lt;/strong&gt;&lt;/p&gt;</description></item></channel></rss>