Skip to content

ArjunKrish7356/HTTP-Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

http-server

A basic HTTP server implemented in Rust.

Usage

  1. Build the project:

    cargo build --release
  2. Run the server:

    cargo run
  3. Access the server: Open your browser or use curl to access the server at http://127.0.0.1:4221.

Endpoints

  • /: Returns a 200 OK response.
  • /echo/<message>: Echoes back the message in the response body.
  • /user-agent: Returns the User-Agent header from the request.
  • /files/<filename>: Serves files from the specified directory.
  • POST /files/<filename>: Creates a new file with the request body in the specified directory.

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •