Пример #1
0
 public static HttpWebResponse GetResponse(
     string method, string url,
     string enctype = MimeMap.APPLICATION_X_WWW_FORM_URLENCODED,
     Dictionary <string, object> updata  = null,
     Dictionary <string, object> upfiles = null,
     HttpStateContainer config           = null)
 {
     return(new HttpAccess(config).GetLastResponse(method, enctype, url, updata, upfiles));
 }
Пример #2
0
 public static string Download(Stream receiver,
                               string method, string url,
                               string enctype = MimeMap.APPLICATION_X_WWW_FORM_URLENCODED,
                               Dictionary <string, object> updata  = null,
                               Dictionary <string, object> upfiles = null,
                               int bufferSize            = 4096,
                               HttpStateContainer config = null)
 {
     return(new HttpAccess(config).Download(receiver, method, enctype, url, updata, upfiles, bufferSize));
 }
Пример #3
0
 public HttpAccess(HttpStateContainer config)
 {
     if (config != null)
     {
         StateContainer = config;
     }
     else
     {
         StateContainer = new HttpStateContainer();
     }
 }
Пример #4
0
 public static string Delete(string url, Dictionary <string, object> updata = null, HttpStateContainer config = null)
 => new HttpAccess(config).Delete(url, updata);
Пример #5
0
 public static JToken DeleteFor(string url, object updata,
                                HttpStateContainer config = null)
 => new HttpAccess(config).DeleteFor(url, updata);
Пример #6
0
 public static TRet DeleteFor <TRet>(string url, object updata,
                                     HttpStateContainer config = null)
 => new HttpAccess(config).DeleteFor <TRet>(url, updata);
Пример #7
0
 public static string DeleteDownload(Stream receiver, string url, object updata,
                                     int bufferSize = HttpAccess.RECOMMENDED_BUFFER_SIZE, HttpStateContainer config = null)
 => new HttpAccess(config).DeleteDownload(receiver, url, updata, bufferSize);
Пример #8
0
 public static HttpWebResponse PostResponse(string url, Dictionary <string, object> updata = null,
                                            HttpStateContainer config = null)
 => new HttpAccess(config).PostResponse(url, updata);
Пример #9
0
 public static JToken PostFor(string url, Dictionary <string, object> updata = null,
                              HttpStateContainer config = null)
 => new HttpAccess(config).PostFor(url, updata);
Пример #10
0
 public static string PostDownload(Stream receiver, string url, Dictionary <string, object> updata = null,
                                   int bufferSize = HttpAccess.RECOMMENDED_BUFFER_SIZE, HttpStateContainer config = null)
 => new HttpAccess(config).PostDownload(receiver, url, updata, bufferSize);
Пример #11
0
 public static string Post(string url, object updata, HttpStateContainer config = null)
 => new HttpAccess(config).Post(url, updata);
Пример #12
0
 public static string PutFiles(string url, Dictionary <string, object> updata = null, Dictionary <string, object> upfiles = null, HttpStateContainer config = null)
 => new HttpAccess(config).PutFiles(url, updata, upfiles);
Пример #13
0
 public static TRet PutJsonFor <TRet>(string url, Dictionary <string, object> updata = null,
                                      HttpStateContainer config = null)
 => new HttpAccess(config).PutJsonFor <TRet>(url, updata);
Пример #14
0
 public static TRet PostFilesFor <TRet>(string url, object updata, Dictionary <string, object> upfiles = null, HttpStateContainer config = null)
 => new HttpAccess(config).PostFilesFor <TRet>(url, updata, upfiles);