Exemplo n.º 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));
 }
Exemplo n.º 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));
 }
Exemplo n.º 3
0
 public HttpAccess(HttpStateContainer config)
 {
     if (config != null)
     {
         StateContainer = config;
     }
     else
     {
         StateContainer = new HttpStateContainer();
     }
 }
Exemplo n.º 4
0
 public static string Delete(string url, Dictionary <string, object> updata = null, HttpStateContainer config = null)
 => new HttpAccess(config).Delete(url, updata);
Exemplo n.º 5
0
 public static JToken DeleteFor(string url, object updata,
                                HttpStateContainer config = null)
 => new HttpAccess(config).DeleteFor(url, updata);
Exemplo n.º 6
0
 public static TRet DeleteFor <TRet>(string url, object updata,
                                     HttpStateContainer config = null)
 => new HttpAccess(config).DeleteFor <TRet>(url, updata);
Exemplo n.º 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);
Exemplo n.º 8
0
 public static HttpWebResponse PostResponse(string url, Dictionary <string, object> updata = null,
                                            HttpStateContainer config = null)
 => new HttpAccess(config).PostResponse(url, updata);
Exemplo n.º 9
0
 public static JToken PostFor(string url, Dictionary <string, object> updata = null,
                              HttpStateContainer config = null)
 => new HttpAccess(config).PostFor(url, updata);
Exemplo n.º 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);
Exemplo n.º 11
0
 public static string Post(string url, object updata, HttpStateContainer config = null)
 => new HttpAccess(config).Post(url, updata);
Exemplo n.º 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);
Exemplo n.º 13
0
 public static TRet PutJsonFor <TRet>(string url, Dictionary <string, object> updata = null,
                                      HttpStateContainer config = null)
 => new HttpAccess(config).PutJsonFor <TRet>(url, updata);
Exemplo n.º 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);