Skip to content

About

A simple HTTP REST server implementation for C#. For use as an embedded HTTP server for small projects that require the use of the HTTP GET and POST methods.

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

SimpleHttpServer

A simple HTTP REST server implementation for C#. For use as an embedded HTTP server for small projects.

Basic how this works snippet: 👍

WebServer app = new WebServer(3001);

app.get("/", (WebServerRequest req, WebServerResponse res) =>
{
    res.setMIMEtype("application/xml");
    res.send("<XML><MESSAGE>It works!</MESSAGE></XML>");
});

app.post("/", (WebServerRequest req, WebServerResponse res) =>
{
    string query = req.param("query");

    res.setMIMEtype("application/xml");
    res.send(string.Format("<XML><MESSAGE>Your query is below.</MESSAGE><QUERY>{0}</QUERY></XML>", query));
});

app.Start();

Helpful gist https://gist.github.com/aksakalli/9191056

About

A simple HTTP REST server implementation for C#. For use as an embedded HTTP server for small projects that require the use of the HTTP GET and POST methods.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages