Skip to content

Commit b8b8511

Browse files
authored
Adding customHosts change (#468)
1 parent 55f15d6 commit b8b8511

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

changelogs/v3-upgrade-guide.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,17 @@
6666
### Added `browser` field in package.json.
6767
- The `browser` field indicates the entry point for client applications using Microsoft Graph JS SDK library.
6868

69+
### Added `customHosts` options
70+
- The `AuthenticationHandler` and `TelemetryHandler` will add or update the request headers only if the request URL is a Graph endpoint or a custom endpoint.
71+
- `customHosts` property in `IOptions`, `IClientOptions` takes in a `Set` of custom hosts.
72+
73+
```typescript
74+
// Consider the custom request url is https://CUSTOM_HOST.com
75+
const customHost = "CUSTOM_HOST";
76+
const customHosts = new Set<string>([customHost]);
77+
const client = Client.initWithMiddleware({ middleware, customHosts });
78+
```
79+
6980
### Added `GraphClientError`
7081
- `GraphClientError` handles client-side errors encountered within the JavaScript Client SDK whereas, `GraphError` class should be used to handle errors in the response from the Graph API.
7182

0 commit comments

Comments
 (0)