Skip to content

yuann3/http-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust HTTP Server

A simple HTTP server implemented in Rust, supporting basic GET and POST requests, file operations, and gzip compression.

Features

  • HTTP/1.1 protocol support
  • GET and POST request handling
  • File upload and download capabilities
  • User-Agent echo endpoint
  • Gzip compression support
  • Multithreaded request handling

Getting Started

Installation

  1. Clone the repository:

  2. Run the server:

    ./build.sh
    

Usage

The server listens on 127.0.0.1:4221 by default. Here are some example requests you can make:

  • Echo endpoint: GET /echo/<string>
  • User-Agent: GET /user-agent
  • File download: GET /files/<filename>
  • File upload: POST /files/<filename>

The server supports gzip compression. Include the Accept-Encoding: gzip header in your requests to receive compressed responses when applicable.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A small HTTP server that is written in Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published