SimpleREST.NET 0.1
A simple and minimal api framework for .net base on Express.js
Loading...
Searching...
No Matches
ResourceNotFoundHandler.cs
Go to the documentation of this file.
2
3namespace SimpleRest.Handlers;
4
6
8{
9 public override void OnBeforeRequestEnd(
10 SimpleRestApi api,
11 SimpleRestRequest request,
12 SimpleRestResponse response
13 )
14 {
15 base.OnBeforeRequestEnd(api, request, response);
16 if (request.Method != SimpleRestMethod.OPTIONS)
17 response.View(new ResourceNotFoundView());
18 }
19}
The main class for all incoming request data. This is a wrapper for the HttpListenerRequest class....
void View(string content, string contentType="text/html; charset=utf-8")
override void OnBeforeRequestEnd(SimpleRestApi api, SimpleRestRequest request, SimpleRestResponse response)