mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
RestApiClient: use Accept header for non-raw requests
This commit is contained in:
parent
67551e6285
commit
a74381ebc9
@ -50,6 +50,11 @@ class RestApiClient
|
||||
'Authorization: Basic ' . $auth,
|
||||
'Connection: close'
|
||||
);
|
||||
|
||||
if (! $raw) {
|
||||
$headers[] = 'Accept: application/json';
|
||||
}
|
||||
|
||||
if ($body !== null) {
|
||||
$body = json_encode($body);
|
||||
$headers[] = 'Content-Type: application/json';
|
||||
|
Loading…
x
Reference in New Issue
Block a user