Skip to content

Commit a223fff

Browse files
authored
Fix IsSuccessful on RestResponse<T> (#1676)
Closes #1675
1 parent 49ce028 commit a223fff

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/RestSharp/Response/RestResponse.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public static RestResponse<T> FromResponse(RestResponse response)
4242
ErrorMessage = response.ErrorMessage,
4343
ErrorException = response.ErrorException,
4444
Headers = response.Headers,
45+
IsSuccessful = response.IsSuccessful,
4546
ResponseStatus = response.ResponseStatus,
4647
ResponseUri = response.ResponseUri,
4748
Server = response.Server,

test/RestSharp.IntegrationTests/StatusCodeTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public async Task ContentType_Additional_Information() {
3636
var response = await _client.ExecuteAsync<TestResponse>(request);
3737

3838
response.StatusCode.Should().Be(HttpStatusCode.OK);
39+
response.IsSuccessful.Should().BeTrue();
3940
}
4041

4142
[Fact]

0 commit comments

Comments
 (0)