You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
HttpClient BaseAddress not used - doesn't contain a valid scheme for an empty base URL #1727
Is your feature request related to a problem? Please describe.
Creating new RestRequest(HttpClient) will not use HttpClient base address and fails if you try execute request like this: new RestRequest("GetAll") with message:
System.ArgumentOutOfRangeException : Request resource doesn't contain a valid scheme for an empty base URL of the client (Parameter 'request')
Describe the solution you'd like
make new RestRequest(HttpClient) ctor automatically assign HttpClient.BaseAddress to RestClient.Options.BaseUrl
Describe alternatives you've considered
var httpClient = new HttpClient() { BaseAddress = new Uri("https://localhost:1234/api/Product/v1/") };
var client = new RestClient(httpClient, new RestClientOptions(httpClient.BaseAddress));
Additional context
If there is a good reason for not doing this automatically, perhaps just update the error message describing this?
Activity
Fixes #1727
Prerelease 107.2 (#1730)