From ab4876286ac99a7578e095aaa104a66686d0c0f1 Mon Sep 17 00:00:00 2001 From: juhoinkinen <34240031+juhoinkinen@users.noreply.github.com> Date: Tue, 22 Aug 2023 19:07:18 +0300 Subject: [PATCH] Use api.annif.org via https to fix 405 response from POST to /suggest --- annif_client.py | 2 +- tests/test_annif_client.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/annif_client.py b/annif_client.py index a927544..94672b1 100755 --- a/annif_client.py +++ b/annif_client.py @@ -4,7 +4,7 @@ import requests # Default API base URL -API_BASE = 'http://api.annif.org/v1/' +API_BASE = 'https://api.annif.org/v1/' class AnnifClient: diff --git a/tests/test_annif_client.py b/tests/test_annif_client.py index dd8d467..bdac89e 100644 --- a/tests/test_annif_client.py +++ b/tests/test_annif_client.py @@ -27,7 +27,7 @@ def test_create_client_api_base(): def test_projects(client): datafile = os.path.join(os.path.dirname(__file__), 'data/projects.json') responses.add(responses.GET, - 'http://api.annif.org/v1/projects', + 'https://api.annif.org/v1/projects', body=open(datafile).read()) result = client.projects assert len(result) == 2