https://github.com/expath/expath-http-client-java
EXPath HTTP Client - Java reference implementations
https://github.com/expath/expath-http-client-java
expath http saxon
Last synced: 3 months ago
JSON representation
EXPath HTTP Client - Java reference implementations
- Host: GitHub
- URL: https://github.com/expath/expath-http-client-java
- Owner: expath
- License: other
- Created: 2019-05-02T16:48:43.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2024-09-20T00:17:29.000Z (over 1 year ago)
- Last Synced: 2025-07-11T13:50:15.657Z (9 months ago)
- Topics: expath, http, saxon
- Language: Java
- Homepage:
- Size: 26.1 MB
- Stars: 3
- Watchers: 6
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/expath/expath-http-client-java/actions/workflows/ci.yml)
[](https://adoptopenjdk.net/)
[](https://www-archive.mozilla.org/mpl/MPL-1.0.txt)
[](https://search.maven.org/search?q=g:%22org.expath.http.client%22%20AND%20a:%22http-client%22)
# Java implementation of EXPath HTTP Client Module
This is a Java implementation of the EXPath [HTTP Client Module](http://expath.org/spec/http-client) specification.
We provide a Java library that may be used as the basis for specific product implementations, and an RI (Reference
Implementation) developed for [Saxon](https://www.saxonica.com) which demonstrates how to use
the library.
# Building from source
Requires:
* Java 1.8 or newer
* Maven 3 or newer
```bash
$ git clone https://github.com/expath/expath-http-client-java.git
$ cd expath-http-client-java
$ mvn clean package
```
**NOTE:** Where `.sh` files are specified below, the equivalent `.bat` files also exist for Microsoft Windows users.
# Using the Saxon RI
**Compatibility with Saxon Versions**
| http-client-saxon Version | Saxon Versions |
|---------------------------|----------------|
| 1.5.0+ | 12.0+ |
| 1.4.0+ | 10.3+ |
| 1.3.0 | 9.9+ |
| <= 1.2.4 | 9.7+ |
*Additional Saxon specific examples can be found in [http-client-saxon/README.md](http-client-saxon/README.md)*.
To use the RI for Saxon, you require several Jar files to be present on the classpath with Saxon:
`http-client-saxon-VERSION.jar`, `http-client-java-VERSION.jar`, and the dependencies of `http-client-java`; to make this easier we provide an Uber Jar, whereby you can just place `http-client-saxon-VERSION-uber.jar` onto Saxon's classpath.
If you have built from source these can be found in the respective folders: `http-client-saxon/target/`,
and `http-client-java/target/`, alternatively you may download the releases from
[Maven Central](https://search.maven.org/search?q=g:org.expath.http.client).
Saxon also needs to have the EXPath HTTP Client Module's functions registered with it. Depending on how you are
using Saxon, will depend on how this is done.
If you are using Saxon's classic API from Java, you can do something like:
```java
import org.expath.httpclient.saxon.SendRequestFunction;
...
Configuration configuration = new Configuration();
configuration.registerExtensionFunction(new SendRequestFunction());
...
```
If you are using Saxon from the command line, you may specify a Saxon
[configuration file](https://www.saxonica.com/html/documentation/configuration/configuration-file/), to which you
need to add an `` to the `` section, for example:
```xml
...
org.expath.httpclient.saxon.SendRequestFunction
...
```
More information if needed about extension functions for Saxon can be found
[here](https://www.saxonica.com/html/documentation/extensibility/integratedfunctions/ext-full-J.html).