A minimalistic HTTP library written in pure C.
- Simple
Hello, World!
example in Socked. See/examples
for more example.
// app.c
#include "include/socked.h"
void handler(Sc_Request *req, Sc_Response *res) {
sc_set_body(res, "Hello, World!");
}
int main() {
Sc_Server *server = sc_server();
sc_get(server, "/", handler);
sc_listen(server, "127.0.0.1", 8080);
}
- Coming Soon.
- Coming Soon.
- Coming Soon.
- You need Python and
requests
module to run tests. Examples (/examples
) also used as test. - Run all tests.
$ python test.py
- Run a single test. Test name is extensionless file name in
/examples
folder eg. hello, json.
$ python test.py <test_name>
- MIT License.