Skip to content

Commit

Permalink
Added failing test for issue tmenier#794
Browse files Browse the repository at this point in the history
  • Loading branch information
rwasef1830 committed Jan 10, 2024
1 parent 6429dae commit d26c398
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/Flurl.Test/Http/RealHttpTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,19 @@ public class RealHttpTests
Assert.AreEqual(2, result.json["b"].GetInt32());
}

[Test]
[TestCase(HttpCompletionOption.ResponseHeadersRead)]
[TestCase(HttpCompletionOption.ResponseContentRead)]
public async Task can_get_json_with_http_completion_option_headers(HttpCompletionOption completionOption)
{
var result = await "https://httpbin.org"
.AppendPathSegment("gzip")
.WithHeader("Accept-encoding", "gzip")
.GetJsonAsync<Dictionary<string, object>>(completionOption);

Assert.AreEqual(true, ((JsonElement)result["gzipped"]).GetBoolean());
}

[Test]
public async Task can_get_stream() {
using (var stream = await "https://www.google.com".GetStreamAsync())
Expand Down

0 comments on commit d26c398

Please sign in to comment.