refit
refit copied to clipboard
[BUG] Issue with Task<IApiResponse> on following request.
Describe the bug
When calling method without return (with return works fine), The following call on the same HttpClient fails by void. No request is made.
e.g:
IApiResponse respone = await service.Update();
Definition IEndpoint
[Get("/")]
Task<IApiRespose<string>> Get()
[Put("/")]
Task<IApiRespose> Update()
Setup
this.httpClient = RestService.CreateHttpClient(options.ApiBaseUrl);
this.endpoint = RestService.For<IEndpoint>(this.httpClient)
await endpoint.Update() // works
await endpoint.Get()// no request is made
Side note. If I add HttpLoggingHandler to http client all works properly.
If I change update to return IApiReponse<string> all works properly as well.
Environment
- OS: Windows 10
- Device: Rider
- Version: 6.3.2
- .NET: .NET Framework 4.6.2
As a side note: If I read headers, it also works. So only case is where nothing else after response is read.