All Projects → huntlabs → hunt-http

huntlabs / hunt-http

Licence: Apache-2.0 license
http library for D, support http 1.1 / http 2.0 (http2) / websocket server and client.

Programming Languages

d
599 projects

Projects that are alternatives of or similar to hunt-http

Jetty.project
Eclipse Jetty® - Web Container & Clients - supports HTTP/2, HTTP/1.1, HTTP/1.0, websocket, servlets, and more
Stars: ✭ 3,260 (+11141.38%)
Mutual labels:  http2, http-client, http-server
Armeria
Your go-to microservice framework for any situation, from the creator of Netty et al. You can build any type of microservice leveraging your favorite technologies, including gRPC, Thrift, Kotlin, Retrofit, Reactive Streams, Spring Boot and Dropwizard.
Stars: ✭ 3,392 (+11596.55%)
Mutual labels:  http2, http-client, http-server
Firefly
Firefly is an asynchronous web framework for rapid development of high-performance web application.
Stars: ✭ 277 (+855.17%)
Mutual labels:  http2, http-client, http-server
Akka Http
The Streaming-first HTTP server/module of Akka
Stars: ✭ 1,163 (+3910.34%)
Mutual labels:  http2, http-client, http-server
tipi
Tipi - the All-in-one Web Server for Ruby Apps
Stars: ✭ 214 (+637.93%)
Mutual labels:  http2, http-server
EthernetWebServer SSL
Simple TLS/SSL Ethernet WebServer, HTTP Client and WebSocket Client library for for AVR, Portenta_H7, Teensy, SAM DUE, SAMD21, SAMD51, STM32F/L/H/G/WB/MP1, nRF52 and RASPBERRY_PI_PICO boards using Ethernet shields W5100, W5200, W5500, ENC28J60 or Teensy 4.1 NativeEthernet/QNEthernet. It now supports Ethernet TLS/SSL Client. The library supports …
Stars: ✭ 40 (+37.93%)
Mutual labels:  http-client, http-server
matador
Take your appclication by the horns
Stars: ✭ 59 (+103.45%)
Mutual labels:  http-client, http-server
http4ts
Server as a Function http toolkit for TypeScript & JavaScript
Stars: ✭ 30 (+3.45%)
Mutual labels:  http-client, http-server
Curlsharp
CurlSharp - .Net binding and object-oriented wrapper for libcurl.
Stars: ✭ 153 (+427.59%)
Mutual labels:  http2, http-client
phorklift
Phorklift is an HTTP server and proxy daemon, with clear, powerful and dynamic configuration.
Stars: ✭ 43 (+48.28%)
Mutual labels:  http2, http-server
zenith
⚡ Functional Scala HTTP server, client, and toolkit.
Stars: ✭ 15 (-48.28%)
Mutual labels:  http-client, http-server
cpphttpstack
c++ api for http client & server
Stars: ✭ 30 (+3.45%)
Mutual labels:  http-client, http-server
Simple Httpd
Drop-in replacement for Python SimpleHTTPServer. Provides TLS via Let's Encrypt over HTTP2, and auto generated self-signed certificates.
Stars: ✭ 217 (+648.28%)
Mutual labels:  http2, http-server
go-sse
Fully featured, spec-compliant HTML5 server-sent events library
Stars: ✭ 165 (+468.97%)
Mutual labels:  http-client, http-server
Hypercorn
Official mirror of https://gitlab.com/pgjones/hypercorn https://pgjones.gitlab.io/hypercorn/
Stars: ✭ 193 (+565.52%)
Mutual labels:  http2, http-server
libmicrohttpd-http2
HTTP/2 support for libmicrohttpd
Stars: ✭ 21 (-27.59%)
Mutual labels:  http2, http-server
waspy
WASP framework for Python
Stars: ✭ 43 (+48.28%)
Mutual labels:  http-client, http-server
rawhttp
HTTP library to make it easy to deal with raw HTTP.
Stars: ✭ 156 (+437.93%)
Mutual labels:  http-client, http-server
aiohttp-json-rpc
Implements JSON-RPC 2.0 using aiohttp
Stars: ✭ 54 (+86.21%)
Mutual labels:  http-client, http-server
BCA-Phantom
A multi-platform HTTP(S) Reverse Shell Server and Client in Python 3
Stars: ✭ 80 (+175.86%)
Mutual labels:  http-client, http-server

Build Status

hunt-http

Hunt-Http is a flexible performant http server and client written in D Programming Language.

Features

Feature Server Client
HTTP 1.x tested tested
HTTP/2 tested tested
TLS 1.2 tested tested[1]
WebSocket[2] tested tested
Routing tested none
Cookie tested tested[3]
Session tested[4] tested
Form-Data[5] tested tested
X-WWW-Form tested tested

Note:

[1] Mutual TLS supported
[2] WSS untested
[3] In-memory only
[4] In-memory only
[5] File upload and download

Simple codes

Using hunt-http build a web server

import hunt.http;

void main()
{
    auto server = HttpServer.builder()
        .setListener(8080, "0.0.0.0")
        .setHandler((RoutingContext context) {
            context.write("Hello World!");
            context.end();
        }).build();

    server.start();
}

Using hunt-http build a http client

import hunt.http;

import std.stdio;

void main()
{
    auto client = new HttpClient();

    auto request = new RequestBuilder().url("http://www.huntlabs.net").build();

    auto response = client.newCall(request).execute();

    if (response !is null)
    {
        writeln(response.getBody().asString());
    }
}

Using hunt-http build a websocket server

import hunt.http;

void main()
{
    auto server = HttpServer.builder()
        .setListener(8080, "0.0.0.0")
        .websocket("/ws", new class AbstractWebSocketMessageHandler {
            override void onText(WebSocketConnection connection, string text)
            {
                connection.sendText("Hello " ~ text);
            }
        }).build()

    server.start();
}

Avaliable versions

Name Description
HUNT_HTTP_DEBUG Used to log debug messages about Hunt-HTTP
HUNT_METRIC Used to enable some operations and APIs about metric

TODO

  • Reorganizing modules
  • PersistentCookieStore for HttpClient
  • Benchmark

References

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].