Skip to content

MrWoo034/simple-web-server-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple-web-server-rs

A simple web server in Rust.

Prequisites

Getting Start

  git clone https://github.com/MrWoo034/simple-web-server-rs.git
  cd simple-web-server-rs

Build

  make build

Run

  make run

Clean

  make clean

API Methods

POST /foo

Takes a name as a String and generated a UUID for Foo.id. Places this Foo in the cache. Returns the Foo object placed in cache. Example payload:

  {
    "name": "Leif"
  }

GET /foo/{id}

Takes an id as a String and looks for the corresponding Foo object in cache. Returns the Status 200 and body of Foo object if found, 404 otherwise.

DELETE /foo/{id}

Takes an id as a String and removes that Foo entry from the cahce. Returns the Status 204 and empty body if object was found and removed, and 404 otherwise.

About

A simple web server in Rust.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published