http-kit

http-kit is a minimalist, event-driven, high-performance Clojure HTTP server/client library with WebSocket and asynchronous support

Github星跟踪图

HTTP Kit

A high-performance event-driven HTTP client+server for Clojure

CHANGELOG, Current semantic version/s:

[http-kit "2.3.0"]         ; Stable, published by contributors, see CHANGELOG for details
[http-kit "2.4.0-alpha6"]  ; Dev,    published by contributors, see CHANGELOG for details
[http-kit "2.1.19"]        ; Legacy, published by @shenfeng

See the project website for documentation, examples, benchmarks, etc.

Project status

http-kit's author (@shenfeng) unfortunately hasn't had much time to maintain http-kit recently. To help out I'll be doing basic issue triage, accepting minor/obvious PRs, etc.

A big thank you to the current contributors for keeping the project going! Additional contributors welcome: please ping me if you'd be interested in lending a hand.

- @ptaoussanis

Hack locally

Hacker friendly: zero dependencies, written from the ground-up with only ~3.5k lines of code (including java), clean and tidy.

# Modify as you want, unit tests back you up:
lein test

# May be useful (more info), see `server_test.clj`:
./scripts/start_test_server

# Some numbers on how fast can http-kit's client can run:
lein test :benchmark

Enabling http-kit client SNI support

Requires JVM >= 8, http-kit >= 2.4.0-alpha6.
Common cause of: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure

To retain backwards-compatibility with JVMs < 8, the http-kit client currently does not have SNI support enabled by default.

This default may be changed in a future breaking release. But in the meantime, manually enabling SNI support is easy:

  (:require [org.httpkit.sni-client :as sni-client]) ; Needs Java >= 8

  ;; Change default client for your whole application:
  (alter-var-root #'org.httpkit.client/*default-client* (fn [_] sni-client/default-client))

  ;; or temporarily change default client for a particular thread context:
  (binding [org.httpkit.client/*default-client* sni-client/default-client]
    <...>)

See org.httpkit.client/*default-client* docstring for more details.

Contact & Contribution

Please use the GitHub issues page for feature suggestions, bug reports, or general discussions. Current contributors are listed here. The project website is also on GitHub.

License

Copyright © 2012-2018 @shenfeng. Distributed under the Apache License Version 2.0.

主要指标

概览
名称与所有者http-kit/http-kit
主编程语言Java
编程语言Ruby (语言数: 8)
平台
许可证Apache License 2.0
所有者活动
创建于2012-03-13 00:51:18
推送于2025-04-15 08:28:50
最后一次提交2025-04-15 10:21:59
发布数62
最新版本名称v2.9.0-beta1 (发布于 )
第一版名称2.0-rc1 (发布于 )
用户参与
星数2.5k
关注者数108
派生数343
提交数711
已启用问题?
问题数387
打开的问题数50
拉请求数70
打开的拉请求数5
关闭的拉请求数130
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?