Skip to content
Snippets Groups Projects
Commit 79b67b3a authored by Ere Maijala's avatar Ere Maijala Committed by Robert Lange
Browse files

Alma: Make request timeout configurable and set default to 30 seconds. (#1418)

parent 4af286d7
No related merge requests found
......@@ -3,6 +3,8 @@
apiBaseUrl = "https://api-eu.hosted.exlibrisgroup.com/almaws/v1"
; An API key configured to allow access to Alma:
apiKey = "your-key-here"
; Timeout in seconds when making HTTP requests to the Alma APIs:
http_timeout = 30
; Patron login method to use. The following options are available:
; vufind Use VuFind's user database for authentication -- patrons are retrieved
; from Alma without a password (default)
......
......@@ -156,6 +156,10 @@ class Alma extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterface
// Set method
$client->setMethod($method);
// Set timeout
$timeout = $this->config['Catalog']['http_timeout'] ?? 30;
$client->setOptions(['timeout' => $timeout]);
// Set other GET parameters (apikey and other URL parameters are used
// also with e.g. POST requests)
$client->setParameterGet($paramsGet);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment