Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
RutledgePaulV committed Dec 18, 2020
1 parent 2dd9f98 commit bfcb94f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 20 deletions.
Empty file added docs/01-overview.md
Empty file.
Empty file added docs/02-middleware.md
Empty file.
3 changes: 3 additions & 0 deletions docs/cljdoc.edn
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{:cljdoc.doc/tree
[["Overview" {:file "docs/01-overview.md"}]
["Middleware" {:file "docs/02-middleware.md"}]]}
3 changes: 1 addition & 2 deletions project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject org.clojars.rutledgepaulv/clj-okhttp "0.1.0-SNAPSHOT"
(defproject clj-okhttp/clj-okhttp "0.1.0-SNAPSHOT"

:description
"A fast and lightweight clojure http client constructed on top of OkHttp."
Expand Down Expand Up @@ -28,7 +28,6 @@
[[org.clojure/clojure "1.10.1"]
[metosin/muuntaja "0.6.7"]
[metosin/jsonista "0.2.7"]
[com.squareup.okio/okio "2.9.0"]
[com.squareup.okhttp3/okhttp "4.9.0"]]

:plugins
Expand Down
30 changes: 12 additions & 18 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,23 @@
[![Build Status](https://travis-ci.com/rutledgepaulv/clj-okhttp.svg?branch=master)](https://travis-ci.com/rutledgepaulv/clj-okhttp)
[![Clojars Project](https://img.shields.io/clojars/v/org.clojars.rutledgepaulv/clj-okhttp.svg)](https://clojars.org/org.clojars.rutledgepaulv/clj-okhttp)
[![travisci](https://travis-ci.com/rutledgepaulv/clj-okhttp.svg?branch=master)](https://travis-ci.com/rutledgepaulv/clj-okhttp)
[![clojars](https://img.shields.io/clojars/v/clj-okhttp/clj-okhttp.svg)](https://clojars.org/clj-okhttp)
[![codecov](https://codecov.io/gh/rutledgepaulv/clj-okhttp/branch/master/graph/badge.svg)](https://codecov.io/gh/rutledgepaulv/clj-okhttp)
[![cljdoc](https://cljdoc.org/badge/clj-okhttp/clj-okhttp)](https://cljdoc.org/d/clj-okhttp/clj-okhttp/CURRENT)

### What

A Clojure http and websocket client leveraging [OkHttp](https://github.com/square/okhttp),
[Muuntaja](https://github.com/metosin/muuntaja), and [Jsonista](https://github.com/metosin/jsonista).
Supports synchronous or asynchronous access patterns but does always use blocking io under the hood
(per Square's implementation of OkHttp).
A Clojure http and websocket client built on [OkHttp](https://github.com/square/okhttp),
[Muuntaja](https://github.com/metosin/muuntaja), and [Jsonista](https://github.com/metosin/jsonista). Supports
synchronous or asynchronous access patterns.

Largely follows the style of other http libraries like clj-http but does not attempt to be a drop-in
Largely follows the style of other http libraries like clj-http but does not attempt to be a perfect drop-in
replacement. Supports per-client-instance and per-request middleware.

### Why

I have tried pretty much every http client in the Clojure ecosystem and couldn't find anything that satisfied everything
I want. [hato](https://github.com/gnarroway/hato) comes pretty close but it's only Java 11+, uses cheshire, and I prefer
a more explicit public API. I always had a pleasant experience with OkHttp in a past life when I mostly wrote Java.

- Support for true raw response streaming.
- Stop reading bytes from the server if I close the response stream before reading all content.
- Support for websocket connections.
- Support request/response encoding and decoding supporting json, edn, and transit.
- Request encoding shouldn't retain lazy sequences.
- Don't use exceptions for non-2xx status codes.
- Simple connection pooling.
- Lightweight dependencies.
I want. [hato](https://github.com/gnarroway/hato) comes darn close but it's only Java 11+, uses cheshire, and I prefer a
more explicit public API. I always had a pleasant experience with OkHttp in a past life when I primarily wrote Java.


### [Documentation](https://cljdoc.org/d/org.clojars.rutledgepaulv/clj-okhttp/CURRENT)

0 comments on commit bfcb94f

Please sign in to comment.