public HttpResourceHandler(string method, string path, IServerConfiguration serverConfiguration) { _method = method; _path = path; _pipeline = new HttpHandler(serverConfiguration); _comparison = StringComparison.CurrentCulture; ServerConfiguration = serverConfiguration; AuthenticationScheme = AuthenticationSchemes.Anonymous; }
public Server(int port) { _uriPrefix = String.Format("http://localhost:{0}/", port); _baseUri = string.Format("http://localhost:{0}/", port); BodyParser = BodyParsers.DefaultBodyParser(); BodyWriter = BodyWriters.DefaultBodyWriter(); ParamsParser = new UrlParamsParser(); _anyRequestHandler = new HttpHandler(this); Start(); }