Skip to content

🧦 A minimalistic HTTP library written in pure C.

License

Notifications You must be signed in to change notification settings

orhanemree/socked

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧦 Socked

A minimalistic HTTP library written in pure C.

Hello, World!

  • 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);
}

Quick Start

  • Coming Soon.

Features

  • Coming Soon.

API Reference

  • Coming Soon.

Tests

  • 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>

References

License

  • MIT License.

About

🧦 A minimalistic HTTP library written in pure C.

Resources

License

Stars

Watchers

Forks