/// <summary> /// Execute a POST HTTP request /// </summary> /// <param name="uri">URI for request</param> /// <param name="sendBody">Event handler for sending body</param> /// <returns>HTTP response</returns> public HttpResponse Post(Uri uri, SendBodyEventHandler sendBody) { if (sendBody == null) { throw new ArgumentNullException("sendBody parameter cannot be null"); } HttpRequest httpReq = new HttpRequest(); httpReq.Method = HttpMethod.Post; httpReq.Uri = uri; this.SendBody += sendBody; return(this.Send(httpReq)); }
/// <summary> /// Execute a POST HTTP request /// </summary> /// <param name="uri">URI for request</param> /// <param name="sendBody">Event handler for sending body</param> /// <returns>HTTP response</returns> public HttpResponse Post(Uri uri, SendBodyEventHandler sendBody) { if (sendBody == null) throw new ArgumentNullException("sendBody parameter cannot be null"); HttpRequest httpReq = new HttpRequest(); httpReq.Method = HttpMethod.Post; httpReq.Uri = uri; this.SendBody += sendBody; return this.Send(httpReq); }
/// <summary> /// Execute a POST HTTP request /// </summary> /// <param name="uri">URI for request</param> /// <param name="sendBody">Event handler for sending body</param> /// <returns>HTTP response</returns> public HttpResponse Post(string uri, SendBodyEventHandler sendBody) { return(this.Post(new Uri(uri), sendBody)); }
/// <summary> /// Execute a POST HTTP request /// </summary> /// <param name="uri">URI for request</param> /// <param name="sendBody">Event handler for sending body</param> /// <returns>HTTP response</returns> public HttpResponse Post(string uri, SendBodyEventHandler sendBody) { return this.Post(new Uri(uri), sendBody); }