Closed
Description
From the previous discussion:
The only property not including in the interface is DefaultParameters
.
If this will not be a part of the interface or of the IRestClientOptions it could be optional:
public static Uri BuildUri(this IRestClient restClient, RestRequest request, ParametersCollection? defaultParameters = null) {
defaultParameters ??= new ParametersCollection();
var (uri, resource) = restClient.Options.BaseUrl.GetUrlSegmentParamsValues(request.Resource, restClient.Options.Encode, request.Parameters, defaultParameters);
var mergedUri = uri.MergeBaseUrlAndResource(resource);
var finalUri = mergedUri.ApplyQueryStringParamsValuesToUri(
request.Method,
restClient.Options.Encoding,
restClient.Options.EncodeQuery,
request.Parameters,
defaultParameters
);
return finalUri;
}
If this method will not be accessible in future it is bad for me but solvable.
Originally posted by @nesc58 in #1976 (comment)