예제 #1
0
 public static HttpPostParameter CreateFile(string name, 
                                            string fileName, 
                                            string filePath, 
                                            string contentType,
                                            string contentDisposition)
 {
     var parameter = new HttpPostParameter(name, string.Empty)
                         {
                             Type = HttpPostParameterType.File,
                             FileName = fileName,
                             FilePath = filePath,
                             ContentType = contentType,
                             ContentDisposition = contentDisposition
                         };
     return parameter;
 }
예제 #2
0
        public static HttpPostParameter CreateFile(string name,
                                                   string fileName,
                                                   Stream fileStream,
                                                   string contentType,
                                                   string contentDisposition)
        {
            var parameter = new HttpPostParameter(name, string.Empty)
            {
                Type               = HttpPostParameterType.File,
                FileName           = fileName,
                FileStream         = fileStream,
                ContentType        = contentType,
                ContentDisposition = contentDisposition
            };

            return(parameter);
        }
예제 #3
0
파일: RestBase.cs 프로젝트: Grepsy/hammock
 public virtual void AddField(string name, string value)
 {
     var field = new HttpPostParameter(name, value);
     PostParameters.Add(field);
 }