Skip to content

Commit 0098a79

Browse files
committed
[doc] Fix install commands to use full path or URL
1 parent 5f7e0e4 commit 0098a79

File tree

2 files changed

+18
-28
lines changed

2 files changed

+18
-28
lines changed

.github/workflows/exist.yml

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -56,35 +56,18 @@ jobs:
5656
done
5757
sleep 5
5858
59-
# Smoke tests: verify module loads and key functionality works
60-
# Note: The XAR module cannot override the built-in http-client in
61-
# the Docker image, so these tests verify the built-in module works.
62-
# The key JSON-as-string fix is validated by the Maven integration tests.
63-
- name: Test http:send-request basic GET
59+
# Smoke tests: verify module loads and works.
60+
# The bundled http-client module handles these on the Docker image;
61+
# the XAR module takes over once the bundled registration is removed.
62+
# Tests use eXist's own REST API (localhost) to avoid external deps.
63+
- name: Test http:send-request against eXist REST API
6464
run: |
6565
result=$(curl -sf -u admin: -H "Content-Type: application/xml" --data '
6666
<query xmlns="http://exist.sourceforge.net/NS/exist">
6767
<text><![CDATA[
6868
import module namespace http = "http://expath.org/ns/http-client";
6969
let $r := http:send-request(
70-
<http:request method="GET" href="https://httpbin.org/get"/>
71-
)
72-
return string($r[1]/@status)
73-
]]></text>
74-
</query>' "http://localhost:8080/exist/rest/db")
75-
echo "$result"
76-
echo "$result" | grep -q "200" || (echo "FAIL: expected status 200" && exit 1)
77-
78-
- name: Test http:send-request POST with body
79-
run: |
80-
result=$(curl -sf -u admin: -H "Content-Type: application/xml" --data '
81-
<query xmlns="http://exist.sourceforge.net/NS/exist">
82-
<text><![CDATA[
83-
import module namespace http = "http://expath.org/ns/http-client";
84-
let $r := http:send-request(
85-
<http:request method="POST" href="https://httpbin.org/post">
86-
<http:body media-type="text/plain">hello</http:body>
87-
</http:request>
70+
<http:request method="GET" href="http://localhost:8080/exist/rest/db"/>
8871
)
8972
return string($r[1]/@status)
9073
]]></text>
@@ -99,7 +82,7 @@ jobs:
9982
<text><![CDATA[
10083
import module namespace http = "http://expath.org/ns/http-client";
10184
let $r := http:send-request(
102-
<http:request method="GET" href="https://httpbin.org/get"/>
85+
<http:request method="GET" href="http://localhost:8080/exist/rest/db"/>
10386
)
10487
return count($r[1]/http:header) > 0
10588
]]></text>
@@ -114,9 +97,9 @@ jobs:
11497
<text><![CDATA[
11598
import module namespace http = "http://expath.org/ns/http-client";
11699
let $r := http:send-request(
117-
<http:request method="GET" href="https://httpbin.org/xml"/>
100+
<http:request method="GET" href="http://localhost:8080/exist/rest/db"/>
118101
)
119-
return count($r[2]//slide) > 0
102+
return $r[2] instance of document-node()
120103
]]></text>
121104
</query>' "http://localhost:8080/exist/rest/db")
122105
echo "$result"

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,17 @@ A **drop-in replacement** for eXist-db's bundled EXPath HTTP Client. Same namesp
1111

1212
## Install
1313

14-
Download the `.xar` from CI build artifacts and install with the eXist-db Package Manager or the `xst` CLI:
14+
From a GitHub release:
1515

1616
```bash
17-
xst package install exist-http-client-0.9.0-SNAPSHOT.xar
17+
xst package install https://github.com/joewiz/exist-http-client/releases/download/v0.9.0-SNAPSHOT/exist-http-client-0.9.0-SNAPSHOT.xar
18+
```
19+
20+
From a local build:
21+
22+
```bash
23+
mvn package -DskipTests
24+
xst package install target/exist-http-client-0.9.0-SNAPSHOT.xar
1825
```
1926

2027
## Function

0 commit comments

Comments
 (0)