コード例 #1
0
 public HTTPRequest SetContentBytes(byte[] content, string contentType = null)
 {
     contentHandler = new HTTPRequestContentBytesHandler(content);
     if (contentType != null)
     {
         SetHeader("Content-Type", contentType);
     }
     return(this);
 }
コード例 #2
0
 public HTTPRequest SetContentFromPath(string srcPath,
                                       string contentType = null)
 {
     contentHandler = new HTTPRequestContentUploadHandler(srcPath);
     if (contentType != null)
     {
         SetHeader("Content-Type", contentType);
     }
     return(this);
 }
コード例 #3
0
        public HTTPRequest(string url, HTTPHeaderList headers = null)
        {
            method = "GET";
            SetURL(url);

            if (headers == null)
            {
                headers = new HTTPHeaderList();
            }

            authUser       = null;
            authPassword   = null;
            contentHandler = null;
        }
コード例 #4
0
    public HTTPRequest(string url, HTTPHeaderList headers = null)
    {
      method = "GET";
      SetURL(url);

      if (headers == null)
      {
        headers = new HTTPHeaderList();
      }

      authUser = null;
      authPassword = null;
      contentHandler = null;
    }
コード例 #5
0
 public HTTPRequest SetContentHandler(HTTPRequestContentHandler handler)
 {
     contentHandler = handler;
     return(this);
 }
コード例 #6
0
 public HTTPRequest SetContentBytes(byte[] content, string contentType = null)
 {
   contentHandler = new HTTPRequestContentBytesHandler(content);
   if (contentType != null)
   {
     SetHeader("Content-Type", contentType);
   }
   return this;
 }
コード例 #7
0
 public HTTPRequest SetContentFromPath(string srcPath,
     string contentType = null)
 {
   contentHandler = new HTTPRequestContentUploadHandler(srcPath);
   if (contentType != null)
   {
     SetHeader("Content-Type", contentType);
   }
   return this;
 }
コード例 #8
0
 public HTTPRequest SetContentHandler(HTTPRequestContentHandler handler)
 {
   contentHandler = handler;
   return this;
 }