Commit graph

249 commits

Author SHA1 Message Date
Ruth Linehan
ecad9f730a (TK-179) Have JavaClient/createClient do coercion of client options
Previously, anything that called `JavaClient/createClient` performed the same
coercion on the client options before passing them in as the argument.  This
commit refactors `createClient` to do this coercion itself, thereby removing a
bunch of duplication.

Also, remove the `common/Client` schema and replace it with the
`HttpAsyncClient` interface, and remove an unnecessary call to `.start` in the
clojure `create-client`.
2016-02-12 14:59:06 -08:00
Ruth Linehan
a801ae5b02 (TK-179) Cleanup for PR feedback
* Remove comment about :sslengine as an option, because it no longer seems to
be supported.
* Remove duplicate `.setSslContext`
* Use -> macro to clean up client creation and coersion of options
* Remove outdated TODO on the `common/Client` schema
* Remove unused `SslOptions` schema
* Remove unused imports
2016-02-08 14:15:41 -05:00
Ruth Linehan
4176251521 (TK-179) Remove unused ssl config functions
These functions were previously used for initializing an ssl context for the
clojure http client. However, with the clojure client initialization now just
wrapping the java code, these are no longer needed.
2016-02-08 14:00:07 +00:00
Ruth Linehan
80ed08e75b (TK-179) Refactor clojure client init to use JavaClient/createClient
Previously, there were two completely separate code paths for java and clojure
http client initialization. This meant that there was a lot of duplicated
logic between them for handling a number of client options, such as redirect
strategy, ssl protocols and ciphers, and ssl setup.

This refactors clojure client initialization to use JavaClient/createClient,
thereby removing a lot of this duplication.
2016-02-08 13:59:22 +00:00
Ruth Linehan
24b3d52845 Merge pull request #47 from scottyw/tk179/consolidation
(TK-179) Modify the Clojure implementation to share more of the Java impl
2016-02-04 17:40:05 +00:00
Scott Walker
66c584fff4 Handle an empty content type in the response 2016-02-04 13:11:27 +00:00
Scott Walker
63962dbe45 Apply callback during failure/cancellation. 2016-02-04 12:08:32 +00:00
Scott Walker
41836a72ad Add async/sync test to check that a bad HTTP verb is rejected 2016-02-04 11:07:07 +00:00
Scott Walker
e71c5b8434 Throw error on bad HTTP verb in Clojure 2016-02-04 10:47:24 +00:00
Scott Walker
8548bbb4d7 (TK-179) Modify the Clojure implementation to share more of the Java impl
This commit removes duplicate functionality from the Clojure implementation and reuses the Java request/response handling impl. It doesn't address client creation so there are still two distinct paths for that.

The main changes are Ring <-> Java request/response conversion and the addition of interface ResponseDeliveryDelegate. The delegate implementations take care of the language-specific aspects of response building and promise delivery. One of the Clojure test namespaces is removed too.
2016-02-04 10:47:18 +00:00
Jenkins CI
5a9d80d90e Version 0.5.1-SNAPSHOT 2016-02-02 15:42:30 -08:00
Jenkins CI
c3ac698398 Version 0.5.0 2016-02-02 15:42:25 -08:00
Chris Price
a598a75592 Merge pull request #49 from adreyer/changelog
(maint) update changelog for 0.4.7 release.
2016-02-02 15:31:58 -08:00
Alex Dreyer
6e11d2074f (maint) update changelog for 0.4.7 release. 2016-02-02 15:23:23 -08:00
Preben Ingvaldsen
9d032c1a69 Merge pull request #46 from adreyer/add-request
Add a general request function to the client protocol.
2016-02-02 10:37:49 -08:00
Alex Dreyer
a383bd7046 Add a general request function to the client protocol.
There are a few places where we map request method keywords to
http-client function. The http client then maps them back to keywords
which is redundant. This adds a general request function to the protocol
that accepts a keyword method.
2016-01-29 08:45:44 -08:00
Scott Walker
a50b3ef7a3 Merge pull request #48 from rlinehan/update-gitignore
(maint) Update .gitignore
2016-01-25 15:22:26 +00:00
Ruth Linehan
1ad1434d7b (maint) Update .gitignore
Update .gitignore to exclude anything that starts with `.lein` (e.g.
`.lein-failures` or `.lein-repl-history`).
2016-01-25 14:31:18 +00:00
Ruth Linehan
e66a9847d9 Merge pull request #45 from scottyw/tk312/unbuffered-stream-in-java
(TK-312) Unbuffered streams in Java
2016-01-19 18:20:51 +01:00
Scott Walker
15b13fed4f Update Java API to include ResponseBodyType.UNBUFFERED_STREAM and update Clojure implementation to give consistent HttpContext usage with both clj and Java 2016-01-15 14:31:36 +00:00
Scott Walker
a5ed1d0bf8 Move unbuffered stream Clojure tests into a separate namespace 2016-01-11 07:57:12 +00:00
Jenkins CI
e431b5036f Version 0.4.7-SNAPSHOT 2016-01-09 16:42:34 -08:00
Jenkins CI
2b7af91c24 Version 0.4.6 2016-01-09 16:42:27 -08:00
Chris Price
840edf62be Merge pull request #44 from cprice404/maint/master/update-changelog-for-0.4.6-release
(MAINT) Update CHANGELOG for 0.4.6 release
2016-01-09 16:35:33 -08:00
Chris Price
876fd1c163 (MAINT) Update CHANGELOG for 0.4.6 release 2016-01-09 16:32:49 -08:00
Jeremy Barlow
06910455a5 Merge pull request #43 from cprice404/maint/master/update-to-httpasyncclient-4.1.1
(TK-303) Update to latest apache httpasyncclient
2016-01-07 10:28:23 -08:00
Chris Price
e7c9d22aa4 (MAINT) Update to latest apache httpasyncclient
This commit updates us to the latest version of the Apache
HTTPAsyncClient.  This is necessary in order to make it
possible to use this library in the same VM as the latest
version of clj-http, because they have some common dependencies.

The commit also cleans up some other dependencies while I was
in there.
2015-12-18 12:21:27 -08:00
Jenkins CI
7c4f95ddfd Version 0.4.6-SNAPSHOT 2015-10-13 07:13:14 -07:00
Jenkins CI
3a1aec68c7 Version 0.4.5 2015-10-13 07:13:06 -07:00
David McCauley
d72f8393a5 Merge pull request #42 from scottyw/clojure-unbuffered-stream
(PE-11976) Add option to return response early and stream body asynchronously
2015-10-13 15:04:57 +01:00
Scott Walker
fbab9a37bc Rework tests for improved clarity and AsyncConsumer releaseResources() fix 2015-10-13 12:09:50 +01:00
Scott Walker
e20d5cf7e3 Update docs 2015-10-12 19:15:26 +01:00
Scott Walker
862090251c Incorporate comments from camlow325
- Fixes to ExceptionInsertingPipedInputStream
- Fix to async consumer and removal of decompression code
- Use ResponseContentEncoding to do all decompression including removing previous approach
- Clarify tests and add ConnectionException
2015-10-07 17:45:18 +01:00
Scott Walker
ca5ad63179 (PE-11976) Add option to return the response early and stream the body asynchronously
Adds a new :as option that uses Apache's AsyncConsumer to return the response as quickly as possible then asynchronously stream the response body using piped input/output streams.
2015-10-05 15:38:30 +01:00
Preben Ingvaldsen
99f9b840af Merge pull request #41 from camlow325/maint/master/PE-11025-add-support-section-to-readme
(PE-11025) Add support section to README.md
2015-07-20 10:26:40 -07:00
Jeremy Barlow
91475cc71a (PE-11025) Add support section to README.md
This commit adds a support section to the README.md.
2015-07-17 11:06:25 -07:00
Jeremy Barlow
146d2fb4bc Merge pull request #40 from jpinsonault/tk-182-illegal-arg-exception-on-204-response
(TK-182) Illegal argument exception on 204 response
2015-04-24 12:07:02 -07:00
Joe Pinsonault
c5489e0e43 (MAINT) Added fix/test for java coerceBodyType 2015-04-24 10:17:30 -07:00
Joe Pinsonault
08ca923e69 (MAINT) nil body is coerced into empty string 2015-04-24 10:17:05 -07:00
Joe Pinsonault
c906d5abd0 (TK-182) coerce-body-type handles nil body 2015-04-24 10:05:29 -07:00
Chris Price
b68dda3ae2 (MAINT) Update CHANGELOG for 0.4.4 release 2015-04-15 15:44:55 +01:00
Jenkins CI
8a03faacd6 Version 0.4.5-SNAPSHOT 2015-04-15 07:33:01 -07:00
Jenkins CI
52a4fc7be4 Version 0.4.4 2015-04-15 07:32:57 -07:00
Chris Price
4af8813899 Merge pull request #39 from dparis/fix/master/update-prismatic-deps
(TK-196) Update prismatic library dependencies
2015-04-15 15:21:39 +01:00
Dylan Paris
a75a9eea4b (TK-196) Update prismatic library dependencies
The prismatic/plumbing and prismatic/schema library dependencies are
lagging behind the latest stable version. This will increasingly
cause conflicts in trapperkeeper projects. This patch updates the
dependencies and fixes several functions which were validating against
schemas incompatible with the new versions.

* Update project.clj dependencies
* Use protocol schema instead of the protocol object directly
2015-04-09 15:03:57 -07:00
Jenkins CI
b21b595aee Version 0.4.4-SNAPSHOT 2015-03-20 12:43:09 -07:00
Jenkins CI
964ba2d9c2 Version 0.4.3 2015-03-20 12:43:05 -07:00
Justin May
587318d8d9 Merge pull request #38 from camlow325/maint/master/clj-http-client-0.4.3-release
(MAINT) Updated CHANGELOG.md for clj-http-client 0.4.3 release
2015-03-20 11:25:56 -07:00
Jeremy Barlow
15b5e532e9 (MAINT) Updated CHANGELOG.md for clj-http-client 0.4.3 release
This commit updates the CHANGELOG.md for the clj-http-client 0.4.3
release.
2015-03-20 11:22:12 -07:00
Justin May
b04c03334f Merge pull request #37 from camlow325/maint/master/fixup-timeout-test-names
(MAINT) Fix timeout test names and testing strings
2015-03-20 10:52:21 -07:00