-
Notifications
You must be signed in to change notification settings - Fork 62
Closed
Description
The Timeout property of any HttpClient passed into GraphServiceClient is set by the constructor.
This is bad because:
- I could be using the
HttpClientfor something else. - If
HttpClienthad already been used it will throw an exception.
Steps to reproduce the behavior
var httpClient = new HttpClient();
// make any request with the client
var graphServiceClient = new GraphServiceClient(httpClient); // exception!
Expected behavour
The timeout should be implemented per request.
Actual behaviour
Microsoft.Graph.ServiceException: 'Code: notAllowed
Message: Overall timeout cannot be set after the first request is sent.
InvalidOperationException: This instance has already started one or more requests. Properties can only be modified before sending the first request.
related: #38