Skip to content

Commit

Permalink
temp fix for #179
Browse files Browse the repository at this point in the history
  • Loading branch information
tmenier committed Jun 5, 2017
1 parent 11ac330 commit 2ad2019
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions Test/Flurl.Test.Shared/Http/RealHttpTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,16 @@ public async Task can_post_multipart() {
try {
using (var stream = File.OpenRead(path2)) {
var resp = await "http://httpbin.org/post"
.PostMultipartAsync(content => content
.AddStringParts(new {a = 1, b = 2})
.AddString("DataField", "hello!")
.AddFile("File1", path1)
.AddFile("File2", stream, "foo.txt"))
.PostMultipartAsync(content => {
content
.AddStringParts(new { a = 1, b = 2 })
.AddString("DataField", "hello!")
.AddFile("File1", path1)
.AddFile("File2", stream, "foo.txt");

// hack to deal with #179, remove when this is fixed: https://github.com/kennethreitz/httpbin/issues/340
content.Headers.ContentLength = 735;
})
//.ReceiveString();
.ReceiveJson();
Assert.AreEqual("1", resp.form.a);
Expand Down

0 comments on commit 2ad2019

Please sign in to comment.