Skip to content

Timeout property on passed in HttpClient is modified #67

@fowl2

Description

@fowl2

The Timeout property of any HttpClient passed into GraphServiceClient is set by the constructor.

This is bad because:

  1. I could be using the HttpClient for something else.
  2. If HttpClient had 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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions