src/HttpServer/HttpHandlerBase.cs
/// <summary>
/// Register an HTTP handler for incoming request
/// </summary>
/// <param name="url">URL for mapping the handler execution</param>
/// <param name="handler">HTTP handler for the incoming request on specified URL</param>
Register an HTTP handler for incoming request
Register an HTTP handler for incoming request
public virtual void RegisterHandler(string url, IHttpHandler handler)
        {
            if (handler != null && (url != null) && (url != string.Empty))
                this.Handlers.Add(url.Trim('/').ToLower(), handler);
            else
                throw new ArgumentNullException("url parameter cannot be null or empty");
        }
public virtual void RegisterHandler ( string url , IHttpHandler handler ) { if ( handler != null && ( url != null ) && ( url != string . Empty ) ) this . Handlers . Add ( url . Trim ( ' ' ) . ToLower ( ) , handler ) ; else throw new ArgumentNullException ( " " ) ; }
Register an HTTP handler for incoming request
Register an HTTP handler for incoming request
url
string
URL for mapping the handler execution
URL for mapping the handler execution
handler
IHttpHandler
HTTP handler for the incoming request on specified URL
HTTP handler for the incoming request on specified URL