/// <summary>
 /// Makes a POST request to the specified <paramref name="url"/>.
 /// </summary>
 /// <param name="url">The URL of the request.</param>
 /// <param name="options">The options for the call to the specified <paramref name="url"/>.</param>
 /// <returns>An instance of <see cref="IHttpResponse"/> representing the response.</returns>
 public virtual IHttpResponse Post(string url, IHttpPostOptions options)
 {
     if (string.IsNullOrWhiteSpace(url))
     {
         throw new ArgumentNullException(nameof(url));
     }
     if (options == null)
     {
         throw new ArgumentNullException(nameof(options));
     }
     return(DoHttpRequest(HttpMethod.Post, url, options.GetQueryString(), options.GetPostData()));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Makes a PATCH request to the specified <paramref name="url"/>.
 /// </summary>
 /// <param name="url">The URL of the request.</param>
 /// <param name="options">The options for the call to the specified <paramref name="url"/>.</param>
 /// <returns>An instance of <see cref="SocialHttpResponse"/> representing the response.</returns>
 public static SocialHttpResponse DoHttpPatchRequest(string url, IHttpPostOptions options)
 {
     if (String.IsNullOrWhiteSpace(url))
     {
         throw new ArgumentNullException(nameof(url));
     }
     if (options == null)
     {
         throw new ArgumentNullException(nameof(options));
     }
     return(DoHttpRequest(SocialHttpMethod.Patch, url, options.GetQueryString(), options.GetPostData()));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Makes a POST request to the specified <code>url</code>.
 /// </summary>
 /// <param name="url">The URL of the request.</param>
 /// <param name="options">The options for the call to the specified <code>url</code>.</param>
 /// <returns>Returns an instance of <see cref="SocialHttpResponse"/> representing the response.</returns>
 public virtual SocialHttpResponse DoHttpPostRequest(string url, IHttpPostOptions options) {
     if (String.IsNullOrWhiteSpace(url)) throw new ArgumentNullException("url");
     if (options == null) throw new ArgumentNullException("options");
     return DoHttpRequest(SocialHttpMethod.Post, url, options.GetQueryString(), options.GetPostData());
 }