public void ProcessRequest(HttpListenerContext context) { Url url = HttpUtility.ExtractUrl(context.Request.Url.OriginalString); var method = HttpMethodParser.Parse(context.Request.HttpMethod); var route = Find(method, url.Path); if (route == null) { throw new NotFoundHttpException(url.Path + " invalide"); } HttpListenerRequest request = context.Request; HttpListenerResponse response = context.Response; route.RequestHandler(request, response); }
public AccessControlRequestMethodHeader(string value) : base(NAME, value) { Method = HttpMethodParser.GetMethod(value); }