/// <summary> /// 设置提交的Stream /// content-type=application/octet-stream /// </summary> /// <param name="stream"></param> /// <returns></returns> public INoneBodyBuilder Form(Stream stream) { if (stream == null) { return(this); } _requestBody = new StreamBody(stream); ContentType("application/octet-stream"); return(this); }
public void TestStreamBody(Stream stream) { StreamBody body = new StreamBody(stream); if (stream == null) { Assert.Null(body.GetBody()); } else { Assert.True(body.GetBody().Length > 0); } }