Skip to content

Commit ed61774

Browse files
Fix Added MemberNotNullWhen in IApiResponse (#1483)
* Added MemberNotNullWhen in IApiResponse * Update ApiResponse.cs --------- Co-authored-by: Glenn <[email protected]>
1 parent c1516a8 commit ed61774

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Refit/ApiResponse.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ public interface IApiResponse : IDisposable
134134
/// <summary>
135135
/// Indicates whether the request was successful.
136136
/// </summary>
137+
#if NET5_0_OR_GREATER
138+
[MemberNotNullWhen(true, nameof(ContentHeaders))]
139+
[MemberNotNullWhen(false, nameof(Error))]
140+
#endif
137141
bool IsSuccessStatusCode { get; }
138142

139143
/// <summary>

0 commit comments

Comments
 (0)