forked from NancyFx/Nancy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIStatusCodeHandler.cs
More file actions
23 lines (22 loc) · 922 Bytes
/
Copy pathIStatusCodeHandler.cs
File metadata and controls
23 lines (22 loc) · 922 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
namespace Nancy.ErrorHandling
{
/// <summary>
/// Provides informative responses for particular HTTP status codes
/// </summary>
public interface IStatusCodeHandler
{
/// <summary>
/// Check if the error handler can handle errors of the provided status code.
/// </summary>
/// <param name="statusCode">Status code</param>
/// <param name="context">The <see cref="NancyContext"/> instance of the current request.</param>
/// <returns>True if handled, false otherwise</returns>
bool HandlesStatusCode(HttpStatusCode statusCode, NancyContext context);
/// <summary>
/// Handle the error code
/// </summary>
/// <param name="statusCode">Status code</param>
/// <param name="context">Current context</param>
void Handle(HttpStatusCode statusCode, NancyContext context);
}
}