Skip to content

Commit dfebcf4

Browse files
authored
Merge pull request #4 from heussd/httpcli
Externalise HTTP calls
2 parents c82bb5b + e7d9d07 commit dfebcf4

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

.github/workflows/build-and-push.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,14 @@ jobs:
3131
- name: Build amd64 image
3232
run: |
3333
docker buildx bake amd64 --load
34+
- uses: actions/setup-node@v4
35+
with:
36+
node-version: 'latest'
3437
- name: Test amd64 image
3538
run: |
3639
docker compose up --no-build --pull never -d
3740
sleep 5s
38-
curl --fail 'http://localhost:80'
39-
curl --fail 'http://localhost:80/makefulltextfeed.php?url=sec%3A%2F%2Fwww.tagesschau.de%2Findex~rss2.xml&max=1&links=preserve'
41+
npx rest-cli calls.http --show headers
4042
docker compose down
4143
- name: Build all images
4244
run: |

Readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@ volumes:
3535
- Interesting endpoints (see tab [Request & Response](http://localhost/#request)):
3636
- Article extraction: `http://localhost/extract.php?url=[url]`
3737
- Feed conversion: `http://localhost/makefulltextfeed.php?url=[url]`
38+
- See [calls.http](calls.http) for example calls

calls.http

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
@baseUrl=http://localhost:80
2+
3+
### Index page
4+
GET {{baseUrl}}/index.php
5+
6+
7+
### Extract feed with max 1 article
8+
GET {{baseUrl}}/makefulltextfeed.php
9+
?url=sec%3A%2F%2Fwww.tagesschau.de%2Findex~rss2.xml
10+
&max=1
11+
&links=preserve
12+
13+
### Extract article without images
14+
GET {{baseUrl}}/extract.php
15+
?url=https://en.wikipedia.org/wiki/Vincent_van_Gogh
16+
&images=0

0 commit comments

Comments
 (0)