https://github.com/puppetlabs/clj-http-client
HTTP client library wrapping Apache HttpAsyncClient
https://github.com/puppetlabs/clj-http-client
Last synced: 3 months ago
JSON representation
HTTP client library wrapping Apache HttpAsyncClient
- Host: GitHub
- URL: https://github.com/puppetlabs/clj-http-client
- Owner: puppetlabs
- License: apache-2.0
- Created: 2014-03-12T00:39:04.000Z (over 11 years ago)
- Default Branch: main
- Last Pushed: 2025-02-04T02:12:04.000Z (5 months ago)
- Last Synced: 2025-03-28T15:05:58.329Z (3 months ago)
- Language: Clojure
- Homepage:
- Size: 702 KB
- Stars: 15
- Watchers: 141
- Forks: 30
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# puppetlabs/http-client
[](https://travis-ci.com/puppetlabs/clj-http-client)
This is a wrapper around the [Apache HttpAsyncClient
library](http://hc.apache.org/httpcomponents-asyncclient-4.0.x/) providing
some extra functionality for configuring SSL in a way compatible with Puppet.## Installation
Add the following dependency to your `project.clj` file:
[](http://clojars.org/puppetlabs/http-client)
## Details
Async versions of the http methods are exposed in
puppetlabs.http.client.async, and synchronous versions are in
puppetlabs.http.client.sync. For information on using these namespaces, see the page on
[making requests with clojure clients](doc/clojure-client.md).Additionally, this library allows you to make requests using Java clients. For information
on how to do this, see the page on [making requests with java clients](doc/java-client.md).## Testing
The tests require pki files in the `dev-resources/ssl/` directory of:
* `ca.pem`: a CA cert with the CN of "puppet"
* `key.pem`: a node private key
* `cert.pem`: a cert signed by `ca.pem` for the private key at `key.pem` with a CN of "localhost"
* `alternate-ca.pem`: a valid but untrusted CA certThe repo contains these files needed for testing, though if needed you may
want to read `dev-resources/gen-pki.sh` for the commands to generate additional
sets of files.## Upgrading dependencies
The APIs provided by httpclient change significantly in 5.0 and some of the
internal classes that we've extended change within minor releases of the 4.5
series. Whenever upgrading the apache/httpcomponents dependencies an audit of
the Java classes should be undertaken, especially the classes pertaining to
SafeRedirectedRequest and RedirectStrategy.## Support
We use the [Trapperkeeper project on JIRA](https://tickets.puppetlabs.com/browse/TK)
for tickets on clj-http-client, although Github issues are welcome too.