Skip to content

Commit 4fe1568

Browse files
committed
Fix examples in README.md
1 parent 8eda134 commit 4fe1568

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,29 +183,31 @@ require_once 'vendor/autoload.php';
183183

184184
> :bulb: For security reason it is recommended that you use an ApiKey rather than your username/password.
185185
186-
After you instantiate a client you can set some optional settings.
186+
##### Guzzle configuration
187+
188+
After you instantiate a client you can set some optional `cURL` settings.
187189

188190
```diff
189191
<?php
190192

191193
require_once 'vendor/autoload.php';
192194

193195
// Instantiate with ApiKey
194-
$client = new Redmine\Client('https://redmine.example.com', '1234567890abcdfgh');
196+
$client = new Redmine\Client\NativeCurlClient('https://redmine.example.com', '1234567890abcdfgh');
195197
+
196198
+// [OPTIONAL] if you want to check the servers' SSL certificate on Curl call
197-
+$client->setCheckSslCertificate(true);
199+
+$client->setCurlOption(CURLOPT_SSL_VERIFYPEER, true);
198200
+
199201
+// [OPTIONAL] set the port (it will try to guess it from the url)
200-
+$client->setPort(8080);
202+
+$client->setCurlOption(CURLOPT_PORT, 8080);
201203
+
202204
+// [OPTIONAL] set a custom host
203-
+$client->setCustomHost('https://localhost:8080');
205+
+$client->setCurlOption(CURLOPT_HTTPHEADER, ['Host: http://custom.example.com']);
204206

205207
```
206208
#### 2. Psr-18 compatible Client `Redmine\Client\Psr18Client`
207209

208-
> :bulb: This client was introduced in `v1.7.0` of this library. If you are using the old `Redmine\Client` please [follow this migration guide](docs/migrate-to-psr18client.md).
210+
> :bulb: This client was introduced in `v1.7.0` of this library. If you are using the old `Redmine\Client` please [follow this migration guide](docs/migrate-to-psr18client.md).
209211
210212
The `Psr18Client` requires
211213

0 commit comments

Comments
 (0)