Skip to content

A lightweight HTTP server built with .NET, handling basic GET and POST requests. It supports file serving, echoing messages, and gzip compression. Ideal for understanding basic HTTP communication, request handling, and concurrent connections.

Notifications You must be signed in to change notification settings

abhijithts16/Http-Server-CSharp

Repository files navigation

Simple HTTP Server

This project implements a simple HTTP server that handles various requests using the curl command. It supports basic HTTP methods like GET and POST, along with custom features such as file handling, gzip compression, and concurrent connections. The server responds to different endpoints with various functionalities:

  • Basic HTTP response: Returns a 200 OK for valid requests and a 404 Not Found for invalid paths.
  • Echo endpoint: Responds with the requested path in the response body.
  • Custom headers: Handles User-Agent headers and returns them in the response body.
  • File serving: Allows serving files from a specified directory and creates new files through POST requests.
  • Gzip compression: Supports compression when requested via the Accept-Encoding header.
  • Concurrent connections: Handles multiple client requests simultaneously, responding with appropriate status codes and headers.

This project demonstrates the basic workings of an HTTP server with features like request handling, file I/O, and content compression, making it a good learning tool for understanding HTTP communication and server functionality. Please check the HTTP_Server_Usage_Examples.txt file for more details.

About

A lightweight HTTP server built with .NET, handling basic GET and POST requests. It supports file serving, echoing messages, and gzip compression. Ideal for understanding basic HTTP communication, request handling, and concurrent connections.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published