コード例 #1
0
ファイル: HttpRequestBase.cs プロジェクト: program-meow/Meow
 /// <summary>
 /// 设置内容类型
 /// </summary>
 /// <param name="contentType">内容类型</param>
 public TRequest ContentType(HttpContentTypeEnum contentType)
 {
     if (contentType.IsNull())
     {
         return(This());
     }
     _contentType = contentType;
     return(This());
 }
コード例 #2
0
ファイル: HttpRequestBase.cs プロジェクト: program-meow/Meow
 /// <summary>
 /// 参数
 /// </summary>
 /// <param name="contentType">内容类型</param>
 /// <param name="value">值</param>
 public TRequest Data(HttpContentTypeEnum contentType, string value)
 {
     ContentType(contentType);
     if (value.IsEmpty())
     {
         return(This());
     }
     _data = value;
     return(This());
 }