FlurlHttpException when using AllowHttpStatus : 'Call failed with status code 200 (OK)'

Created on 25 Aug 2020  路  2Comments  路  Source: tmenier/Flurl

When using AllowHttpStatus on a simple request, it will throw an exception even when the actual status code is 200. Of course, no exception when removing the AllowHttpStatus line.
This code was working in 3.0.0-pre3, I think it's a regression in 3.0.0-pre4.
Could you please take a look ?

var page = await "https://www.google.com"
    .AllowHttpStatus(HttpStatusCode.NotFound)
    .GetStringAsync();
3.0 bug

Most helpful comment

All 2 comments

Thanks for reporting, this looks legit. I did tweak that code recently and it looks like I managed to lose the "or any success status" logic in this case. Will get it fixed (and unit tested) for the next (pre)release. Thanks again!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tmenier picture tmenier  路  8Comments

voroninp picture voroninp  路  5Comments

yoshiask picture yoshiask  路  6Comments

Aw3same picture Aw3same  路  6Comments

tmenier picture tmenier  路  4Comments