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
Fix default parameter merging bugs, add MergedParameters to RestResponse (#2349)
* Fix default parameters missing from RestResponse.Request.Parameters (#2282)
Merge default parameters into RestRequest.Parameters early in
ExecuteRequestAsync so they are visible via response.Request.Parameters.
Remove the now-redundant separate merges in RequestContent,
BuildUriExtensions, RequestHeaders, and OAuth1Authenticator.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Add other files
* Fix default parameter merging bugs introduced by #2282
Revert per-site merging to restore original design and fix three bugs:
1. Multi-value dedup — same-name defaults (AllowMultipleDefaultParametersWithSameName) were silently dropped
2. Public API breakage — BuildUriString/GetRequestQuery didn't include defaults when called outside ExecuteAsync
3. Request mutation — stale defaults persisted on reused requests when DefaultParameters changed
Add MergedParameters property on RestResponse to satisfy the original #2282 requirement
of making default parameters visible after execution.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Fix CI: run dotnet test on individual test projects
The addition of RestSharp.slnx alongside RestSharp.sln causes MSB1011
("more than one project or solution file") when running bare dotnet test.
Run each test project explicitly instead.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Make MergedParameters non-null with internal setter
- Initialize to empty RequestParameters() so consumers never need null checks
- Restrict setter to internal to prevent external mutation of response state
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Document MergedParameters property in response docs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/docs/usage/response.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,19 @@ Response object contains the following properties:
28
28
|`ErrorException`|`Exception?`| Exception thrown when executing the request, if any. |
29
29
|`Version`|`Version?`| HTTP protocol version of the request. |
30
30
|`RootElement`|`string?`| Root element of the serialized response content, only works if deserializer supports it. |
31
+
|`MergedParameters`|`ParametersCollection`| Combined view of request parameters and client default parameters at execution time. |
32
+
33
+
### Merged parameters
34
+
35
+
The `MergedParameters` property provides a combined view of the request's own parameters and the client's [default parameters](request.md#request-headers) as they were at execution time. This is useful for logging or debugging the full set of parameters that were applied to a request, since `Request.Parameters` only contains the parameters added directly to the request.
0 commit comments