Problem:
Unable to access JSON formatted API response when uploading to YouTube using
InsertMediaRequest class if the YouTube API returns a 400 Bad Request
Cause:
ResumableUpload.InitializeUpload(CancellationToken cancellationToken)
makes a call to HttpWebRequest.EnsureSuccessStatusCode()
According to the documentation HttpWebRequest.EnsureSuccessStatusCode()
disposes of the response stream.
Suggestion:
Edit ResumableUpload.InitializeUpload(CancellationToken cancellationToken)
Manually check request.IsSuccessStatusCode and if it's false throw a custom
HttpRequestException including the response from the API.
Original issue reported on code.google.com by CableGuy...@gmail.com on 2 Dec 2013 at 2:53
Original issue reported on code.google.com by
CableGuy...@gmail.com
on 2 Dec 2013 at 2:53