Skip to content

Commit

Permalink
check result of PutAsync
Browse files Browse the repository at this point in the history
  • Loading branch information
matthid authored Jul 10, 2017
1 parent e916e88 commit df132f1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Paket.Core/Common/Utils.fs
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,10 @@ type HttpClient with
stream.Write(trailerbytes, 0, trailerbytes.Length)
stream.Write(newlineBytes, 0, newlineBytes.Length)
stream.Position <- 0L
x.PutAsync(url, new StreamContent(stream)).GetAwaiter().GetResult()
let result = x.PutAsync(url, new StreamContent(stream)).GetAwaiter().GetResult()
failIfNoSuccess result |> Async.RunSynchronously
result


let internal addAcceptHeader (client:HttpClient) (contentType:string) =
for headerVal in contentType.Split([|','|], System.StringSplitOptions.RemoveEmptyEntries) do
Expand Down

0 comments on commit df132f1

Please sign in to comment.