]> granicus.if.org Git - icinga2/commitdiff
Remove redundant curl options
authorGunnar Beutner <gunnar@beutner.name>
Tue, 10 Nov 2015 07:30:25 +0000 (08:30 +0100)
committerGunnar Beutner <gunnar@beutner.name>
Tue, 10 Nov 2015 07:30:25 +0000 (08:30 +0100)
refs #10566

doc/9-icinga2-api.md

index 021a538cc4b9293ce09807b20217220507eac802..b52e60bdefd69d90b82c98fcae3d9c9fc85b4382 100644 (file)
@@ -1526,8 +1526,6 @@ The following example uses **PHP** and its `curl` library:
             CURLOPT_HTTPHEADER => $headers,
             CURLOPT_USERPWD => $username . ":" . $password,
             CURLOPT_RETURNTRANSFER => true,
-            CURLOPT_SSL_VERIFYHOST => 2,
-            CURLOPT_SSL_VERIFYPEER => true,
             CURLOPT_CAINFO => "pki/icinga2-ca.crt",
             CURLOPT_POST => count($data),
             CURLOPT_POSTFIELDS => json_encode($data)
@@ -1580,7 +1578,7 @@ The following example uses **Perl** and the `Rest::Client` module:
     $client->setCa("pki/icinga2-ca.crt");
     $client->addHeader("Accept", "application/json");
     $client->addHeader("X-HTTP-Method-Override", "GET");
-    $client->addHeader("Authorization", "Basic ".encode_base64($userpass));
+    $client->addHeader("Authorization", "Basic " . encode_base64($userpass));
     my %json_data = (
             attrs => ['name', 'state', 'last_check_result'],
             joins => ['host.name', 'host.state', 'host.last_check_result'],