Skip to content

ianwong1999/cpp-http-server

Repository files navigation

Compilation

make

Run

By default, it would listen to port 8080, but it could be modified.

./main

Could see the default page in http://localhost:8080/

Add Routes

I added four common route, add_get, add_update, add_pos, add_delete. For other request methods, could use add_route to add.

http_server server;
server.add_get("/main", some_function);
server.add_route("CONNECT", "/some-connection", some_other_function);

Run

server.run(8080);

What Not Supported

octet stream

Third Party Library

https://github.com/nodejs/http-parser I also added some more parsing part on it to parse multipart data (though the content inside each multipart data is not really parsed)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages