Questions tagged [http-kit]

HTTP Kit is a minimalist, efficient, Ring-compatible HTTP client/server for Clojure. It uses a event-driven architecture to support highly concurrent a/synchronous web applications. Feature a unified API for WebSocket and HTTP long polling/streaming.

HTTP Kit is a minimalist, efficient, Ring-compatible HTTP client/server for Clojure. It uses a event-driven architecture to support highly concurrent a/synchronous web applications. Feature a unified API for WebSocket and HTTP long polling/streaming

Information from: http://http-kit.org/

68 questions
1
vote
0 answers

http-kit dependency issue when updating sente-boot

Likely something wrong with my updated build.boot file: https://github.com/laforge49/sente-boot/blob/master/build.boot (Been on the backend too long!) I've tried changing the version of clojure and clojurescript. Previously I was not finding class…
1
vote
1 answer

Handling "rooms" with http-kit and Clojure

I have a nice little WebSocket app using http-kit server, and I'm feeling pretty good about myself. Now I want to add different "rooms" (the list of which should be dynamic) to my app, but I am having difficulty finding any documentation or example…
TrivialCase
  • 1,060
  • 2
  • 14
  • 27
1
vote
1 answer

httpkit-fake does not intercept url build with passed parameters

How can I have with-fake-http intercept an http/get request containing :query-params. The following code produces an exception (require …
user3639782
  • 487
  • 3
  • 10
1
vote
1 answer

Does http-kit support SOAP?

I am considering to have a SOAP web service written using Apache Axis2. I can either use the Axis server or pack it as a .war and deploy it to a servlet container. My REST service is running on http-kit. Is it possible to to use http-kit with SOAP…
user235273
1
vote
2 answers

Clojure http-kit: get query params as map?

I have a server with an endpoint .../end2 which I send parameters to, such as: .../end2?a=2&b=1 How do I get a map {:a 2 :b 1}? I thought (:params request) is the way to go but I get an empty map..
shakedzy
  • 2,853
  • 5
  • 32
  • 62
1
vote
2 answers

How to reload (stop and start) an http-kit "mount state" on a -main function

With the mount library, how do I reload (stop and start) an http-kit "mount state" on a -main function? My current code is this: (defstate server-config :start {:port 7890 :join? false}) (defn start-server [server-config] (when-let [server…
AticusFinch
  • 2,351
  • 3
  • 25
  • 32
1
vote
0 answers

Not logging on requests with (Clojure) http-kit

Is it possible to not log errors on failed requests with the Clojure library http-kit, that is, on the client side. My app is using it to ping other services and them being down is not really an error.
Pablo Fernandez
  • 279,434
  • 135
  • 377
  • 622
1
vote
1 answer

How to enable Gzip on http-kit for minified ClojureScript?

My Clojure application is deployed on Heroku along with a minified 600KB+ ClojureScript JS artifact that I'm serving as a static file at /js/main.js. How do I enable gzip compression on http-kit to reduce the size of my JS artifact over the wire?
Petrus Theron
  • 27,855
  • 36
  • 153
  • 287
1
vote
1 answer

Cannot load http-kit library in clojure

I'm working on windows in eclipse counterclockwise. When i run this code: (require 'http-kit) ;; start concurrent requests, get promise, half the waiting time (let [response1 (http-kit/get "https://clojure.org") response2…
K J
  • 19
  • 2
1
vote
1 answer

how to use proxy in http-kit

I am using http-client in clojure with proxy. And I want to try http-kit, however I don't find a way to use proxy. I have a list of proxies stored in database, and then randomly pick up a proxy and use it in http client. Look like there is no…
Daniel Wu
  • 5,853
  • 12
  • 42
  • 93
1
vote
2 answers

Configure clojure http-kit to use a forward proxy

I have a little Clojure app that uses http-kit to send some http post requests to a server. I want to route the https POST request through a proxy P, ie. I want the traffic to go like App->Proxy->Server. (This is because the target host X restricts…
Marten Sytema
  • 1,906
  • 3
  • 21
  • 29
1
vote
0 answers

get data from http persistent connection

I tried for few days, I am a little confused here. I am using clojure http-kit to make keepalive get request. (ns weibo-collector.weibo (:require [org.httpkit.client :as http] [clojure.java.io :as io])) (def sub-url…
crazy_phage
  • 550
  • 9
  • 28
1
vote
1 answer

How to use http.kit server with drawbridge ring handler?

I have following server code: (ns tweet-sentiment.server (:require [clojure.java.io :as io] [tweet-sentiment.dev :refer [is-dev? inject-devmode-html browser-repl start-figwheel start-less]] [compojure.core :refer [GET POST…
ma2s
  • 1,312
  • 1
  • 11
  • 24
1
vote
1 answer

Using resolve to call function - Clojure

I am using resolve to call a function given they name (String), like (call "+" 10 10 10) ;; 30 The call function: (defn call [this & that] (apply (resolve (symbol this)) that)) Everything works fine on REPL. But when I start the project as a…
Édipo Féderle
  • 4,169
  • 5
  • 31
  • 35
1
vote
1 answer

Max concurrent http requests in http-kit's client?

I'm using http-kit's client, with asynchronous callbacks. I wanted to know if there's a way to set a limit on the number of concurrent outgoing http requests, so that the waiting state for the callbacks doesn't cause an Out-Of-Memory exception. I'm…
Ron Klein
  • 9,178
  • 9
  • 55
  • 88