File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -46,22 +46,21 @@ sets some Guzzle config defaults such as connection and request timeouts, and th
4646In the near future, the ` GraphClientFactory ` will provide some default middleware to use with the Graph API such as retry handlers.
4747
4848``` php
49- use Microsoft\Graph\Core\Core\Http\ GraphClientFactory;
49+ use Microsoft\Graph\Core\GraphClientFactory;
5050
5151$guzzleConfig = [
5252 // your preferred guzzle config
5353];
5454
55- $httpClient = GraphClientFactory::setClientConfig($guzzleConfig)::create();
56-
55+ $httpClient = GraphClientFactory::createWithConfig($guzzleConfig);
5756```
5857
5958### 4. Call Microsoft Graph using the v1.0 endpoint
6059
6160The following is an example that shows how to call Microsoft Graph.
6261
6362``` php
64- use Microsoft\Graph\Core\Core\Http\ GraphClientFactory;
63+ use Microsoft\Graph\Core\GraphClientFactory;
6564
6665class UsageExample
6766{
@@ -71,11 +70,11 @@ class UsageExample
7170
7271 $config = [
7372 'headers' => [
74- 'Authorization' => 'Bearer '. $accessToken
73+ 'Authorization' => $accessToken
7574 ]
7675 ];
7776
78- $httpClient = GraphClientFactory::setClientConfig ($config)::create( );
77+ $httpClient = GraphClientFactory::createWithConfig ($config);
7978 $response = $httpClient->get("/v1.0/me");
8079 $currentUser = json_decode($response->getBody());
8180
You can’t perform that action at this time.
0 commit comments