Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Externalise HTTP calls #4

Merged
merged 1 commit into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@ jobs:
- name: Build amd64 image
run: |
docker buildx bake amd64 --load
- uses: actions/setup-node@v4
with:
node-version: 'latest'
- name: Test amd64 image
run: |
docker compose up --no-build --pull never -d
sleep 5s
curl --fail 'http://localhost:80'
curl --fail 'http://localhost:80/makefulltextfeed.php?url=sec%3A%2F%2Fwww.tagesschau.de%2Findex~rss2.xml&max=1&links=preserve'
npx rest-cli calls.http --show headers
docker compose down
- name: Build all images
run: |
Expand Down
1 change: 1 addition & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ volumes:
- Interesting endpoints (see tab [Request & Response](http://localhost/#request)):
- Article extraction: `http://localhost/extract.php?url=[url]`
- Feed conversion: `http://localhost/makefulltextfeed.php?url=[url]`
- See [calls.http](calls.http) for example calls
16 changes: 16 additions & 0 deletions calls.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@baseUrl=http://localhost:80

### Index page
GET {{baseUrl}}/index.php


### Extract feed with max 1 article
GET {{baseUrl}}/makefulltextfeed.php
?url=sec%3A%2F%2Fwww.tagesschau.de%2Findex~rss2.xml
&max=1
&links=preserve

### Extract article without images
GET {{baseUrl}}/extract.php
?url=https://en.wikipedia.org/wiki/Vincent_van_Gogh
&images=0
Loading