Compare commits
2 commits
523cdb8ad2
...
4903b6320a
Author | SHA1 | Date | |
---|---|---|---|
|
4903b6320a | ||
|
38251d1328 |
2 changed files with 12 additions and 2 deletions
|
@ -100,8 +100,7 @@ public sealed class HttpRequest
|
||||||
throw new RequestParseException("Invalid initial header");
|
throw new RequestParseException("Invalid initial header");
|
||||||
|
|
||||||
//Method
|
//Method
|
||||||
HttpMethod method;
|
if (!Enum.TryParse(parts[0], true, out HttpMethod method))
|
||||||
if (!Enum.TryParse(parts[0], true, out method))
|
|
||||||
throw new RequestParseException("Unknown HTTP method");
|
throw new RequestParseException("Unknown HTTP method");
|
||||||
Method = method;
|
Method = method;
|
||||||
|
|
||||||
|
|
11
HTTP/Responses/NotAcceptable.cs
Normal file
11
HTTP/Responses/NotAcceptable.cs
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
namespace Uwaa.HTTP.Responses;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// An error caused by a client requesting an unavailable format.
|
||||||
|
/// </summary>
|
||||||
|
public class NotAcceptable : HttpResponse
|
||||||
|
{
|
||||||
|
public NotAcceptable(HttpContent? body = null) : base(406, "Not Acceptable", body)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue