Skip to content
This repository has been archived by the owner on Mar 22, 2023. It is now read-only.

Commit

Permalink
makes the transport configurable (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
shamsimam authored and DaoWen committed Jan 23, 2019
1 parent 2a9429e commit 090a0de
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
[org.eclipse.jetty/jetty-alpn-server ~jetty-version]
[org.eclipse.jetty.alpn/alpn-api "1.1.2.v20150522"]
[org.eclipse.jetty.http2/http2-common ~jetty-version]
;; [org.eclipse.jetty.http2/http2-http-client-transport ~jetty-version]
[org.eclipse.jetty.http2/http2-http-client-transport ~jetty-version]
;; [org.eclipse.jetty.http2/http2-client ~jetty-version]
;; [org.eclipse.jetty/jetty-alpn-client ~jetty-version]
[cheshire "5.5.0"]]
Expand Down
8 changes: 6 additions & 2 deletions src/clj/qbits/jet/client/http.clj
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
Request
Response$AsyncContentListener
Result)
(org.eclipse.jetty.client.http
HttpClientTransportOverHTTP)
(java.util.concurrent TimeUnit)
java.net.HttpCookie
(java.nio ByteBuffer)
Expand Down Expand Up @@ -210,17 +212,19 @@
dispatch-io?
tcp-no-delay?
strict-event-ordering?
ssl-context-factory]
ssl-context-factory
transport]
:or {remove-idle-destinations? true
dispatch-io? true
follow-redirects? true
tcp-no-delay? true
strict-event-ordering? false
ssl-context-factory @default-insecure-ssl-context-factory
transport (HttpClientTransportOverHTTP.)
request-buffer-size default-buffer-size
response-buffer-size default-buffer-size}
:as r}]
(let [client (HttpClient. ssl-context-factory)]
(let [client (HttpClient. transport ssl-context-factory)]

(when address-resolution-timeout
(.setAddressResolutionTimeout client (long address-resolution-timeout)))
Expand Down

0 comments on commit 090a0de

Please sign in to comment.