public override HttpWebServerResponseData OnHttpRequest(HttpWebServerRequestData data) { if (data.Query.Get("echo") != null) { return(new HttpWebServerResponseData(data.Query.Get("echo"))); } else { return(new HttpWebServerResponseData("Hello World!")); } }
/// <summary> /// If the http server interface is on all requests to the plugin will /// be directed to this method. The response will be sent back. /// </summary> /// <param name="data"></param> /// <returns>By default the response will be a blank "200 OK" document</returns> public virtual HttpWebServerResponseData OnHttpRequest(HttpWebServerRequestData data) { return null; }
/// <summary> /// If the http server interface is on all requests to the plugin will /// be directed to this method. The response will be sent back. /// </summary> /// <param name="data"></param> /// <returns>By default the response will be a blank "200 OK" document</returns> public virtual HttpWebServerResponseData OnHttpRequest(HttpWebServerRequestData data) { return(null); }