All Projects → ostera → Httpkit

ostera / Httpkit

⚡️ High-level, High-performance HTTP(S) Clients/Servers in Reason/OCaml

Programming Languages

ocaml
1615 projects

Projects that are alternatives of or similar to Httpkit

Zinc
Zinc HTTP Components is an open-source Smalltalk framework to deal with the HTTP networking protocol.
Stars: ✭ 60 (-69.7%)
Mutual labels:  server, https, client
Go Bootstrap
Easy way to bootstrap a web server in Go (Routing|Middleware|Https)
Stars: ✭ 27 (-86.36%)
Mutual labels:  middleware, server, https
Mirakurun
A Modern DTV Tuner Server Service for ISDB.
Stars: ✭ 352 (+77.78%)
Mutual labels:  middleware, server, client
Simple Web Server
A very simple, fast, multithreaded, platform independent HTTP and HTTPS server and client library implemented using C++11 and Boost.Asio. Created to be an easy way to make REST resources available from C++ applications.
Stars: ✭ 2,261 (+1041.92%)
Mutual labels:  server, https, client
Jstp
Fast RPC for browser and Node.js based on TCP, WebSocket, and MDSF
Stars: ✭ 132 (-33.33%)
Mutual labels:  server, client
Qtswissarmyknife
QSAK (Qt Swiss Army Knife) is a multi-functional, cross-platform debugging tool based on Qt.
Stars: ✭ 196 (-1.01%)
Mutual labels:  server, client
Ether.network
https://github.com/Eastrall/Sylver
Stars: ✭ 147 (-25.76%)
Mutual labels:  server, client
Simplenet
An easy-to-use, event-driven, asynchronous network application framework compiled with Java 11.
Stars: ✭ 164 (-17.17%)
Mutual labels:  server, client
Zan Proxy
An extensible proxy for PC/Mobile/APP developer
Stars: ✭ 1,727 (+772.22%)
Mutual labels:  middleware, https
Rolisteam
Rolisteam is a virtual tabletop. It helps you to manage tabletop role playing games with remote friends/players. It provides many features to share maps, pictures, dice roller, manage background music and much more. The main git repository is available here: [https://invent.kde.org/kde/rolisteam].
Stars: ✭ 151 (-23.74%)
Mutual labels:  server, client
Atlasr
Atlasr is a truly open-source and free map browser.
Stars: ✭ 196 (-1.01%)
Mutual labels:  server, client
Actionhero
Actionhero is a realtime multi-transport nodejs API Server with integrated cluster capabilities and delayed tasks
Stars: ✭ 2,280 (+1051.52%)
Mutual labels:  server, https
Spreadsheet server
A python server harnessing the calculational ability of LibreOffice Calc (thanks to 'pyoo'). It provides 'instant' access to the cell ranges of a set of spreadsheets.
Stars: ✭ 132 (-33.33%)
Mutual labels:  server, client
Pure Http
✨ The simple web framework for Node.js with zero dependencies.
Stars: ✭ 139 (-29.8%)
Mutual labels:  middleware, server
Armor
Uncomplicated, modern HTTP server
Stars: ✭ 1,629 (+722.73%)
Mutual labels:  server, https
Gophertunnel
Toolbox for Minecraft software written in Go
Stars: ✭ 156 (-21.21%)
Mutual labels:  server, client
Mutual Tls Ssl
🔐 Tutorial of setting up Security for your API with one way authentication with TLS/SSL and mutual mutual authentication for a java based web server and a client with both Spring Boot. Different clients are provided such as Apache HttpClient, OkHttp, Spring RestTemplate, Spring WebFlux WebClient Jetty and Netty, the old and the new JDK HttpClient, the old and the new Jersey Client, Google HttpClient, Unirest, Retrofit, Feign, Methanol, vertx, Scala client Finagle, Featherbed, Dispatch Reboot, AsyncHttpClient, Sttp, Akka, Requests Scala, Http4s Blaze, Kotlin client Fuel, http4k, Kohttp and ktor. Also other server examples are available such as jersey with grizzly. Also gRPC examples are included
Stars: ✭ 163 (-17.68%)
Mutual labels:  server, https
Lear
Linux Engine for Asset Retrieval - speed-profiled C HTTP server
Stars: ✭ 165 (-16.67%)
Mutual labels:  server, https
Rayo.js
Micro framework for Node.js
Stars: ✭ 170 (-14.14%)
Mutual labels:  middleware, server
Watsonwebserver
Watson is the fastest, easiest way to build scalable RESTful web servers and services in C#.
Stars: ✭ 125 (-36.87%)
Mutual labels:  server, https

⚡️HttpKit — high-level, high-performance HTTP1.1/2 clients/servers in Reason

NOTE: under heavy reconstruction. Latest stable version was 660d1c8

HttpKit is a high-level library for building and consuming web servers over HTTP, HTTPS, and HTTP2.

It serves as a thin layer over h2 and http/af, and when it can it allows you to seamlessly transition from one to the other.

  1. Roadmap
  2. Getting Started
  3. Running the Examples

Roadmap

Feature HTTP/1.1 HTTPS/1.1 HTTP/2 HTTPS/2
Listen as Server Yes No Yes No
Send Request Yes Yes No No
Server Push - - No No

Getting Started

Usage

httpkit can be used both to build servers and to make requests as a client.

Documentation is still a work-in-progress, but there's examples in the examples section that can give you a better idea of how to use the libraries. In short:

For making a request:

open Lwt_result.Infix;

module Httpkit = Httpkit_lwt_unix_httpaf;

let req =
  Httpkit.Request.create(
    ~headers=[("User-Agent", "Reason HttpKit")],
    `GET,
    Uri.of_string("http://api.github.com/repos/ostera/httpkit"),
  );

/* Send over HTTP */
req
|> Httpkit.Client.Http.send
>>= Httpkit.Client.Response.body
|> Lwt_main.run

/* Send over HTTPS */
req
|> Httpkit.Client.Https.send
>>= Httpkit.Client.Response.body
|> Lwt_main.run

For making a server:

module Httpkit = Httpkit_lwt_unix_httpaf;

let port = 8080;

let on_start = (~hoststring) =>
  Logs.app(m => m("Running on %s", hoststring));

let handler: Httpkit.Server.handler =
  (req, reply, kill_server) => {
    let method = req |> Httpkit.Request.meth |> H2.Method.to_string;
    let path = req |> Httpkit.Request.path;
    Logs.app(m => m("%s %s", method, path));
    reply(200, "hi");
    kill_server();
  };

/* Start server over HTTP */
Httpkit.Server.Http.listen(~port, ~address=`Any, ~handler, ~on_start)
|> Lwt_main.run;

/* Start server over HTTPS */
Httpkit.Server.Http.listen(~port, ~address=`Any, ~handler, ~on_start)
|> Lwt_main.run;

Installing with esy

You can install by dropping the following dependencies in your package.json:

{
  "dependencies": {
    "@opam/httpkit": "*",
    "@opam/httpkit-lwt-unix-httpaf": "*",
    "@opam/logs": "*",
    "@opam/fmt": "*",
    // ...
  },
  "resolutions": {
    "@opam/httpkit": "ostera/httpkit:httpkit.opam#f738417",
    "@opam/httpkit-lwt-unix-httpaf": "ostera/httpkit:httpkit-lwt-unix-httpaf.opam#f738417",
  }
}

NOTE: For httpkit make sure you're using the latest commit hash!

Running the Examples

All of the examples are runnable as binaries after compilation, so you can either run esy build and find them within ./_esy/default/build/default/examples/*.exe or you can ask dune to run them for you:

ostera/httpkit λ esy dune exec ./examples/Request.exe
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].