Skip to content

Commit 0fdfbca

Browse files
committed
Create HttpStatusCode extension class
1 parent fcc45df commit 0fdfbca

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
using System.Net;
2+
3+
namespace Initium.Extensions;
4+
5+
public static class HttpStatusCodeExtensions
6+
{
7+
public static bool IsSuccess(this HttpStatusCode statusCode) =>
8+
statusCode is >= HttpStatusCode.OK and < HttpStatusCode.MultipleChoices;
9+
}

0 commit comments

Comments
 (0)