'snippet': {
'title': 'foo',
'description': 'bar'
},
'status': {
'privacyStatus': 'unlisted'
}})
uri = 'https://www.googleapis.com/upload/youtube/v3/videos?uploadtype=resumable&part=snippet%2Cstatus',
method = 'POST',
body = body,
headers = {
'X-Upload-Content-Length': str(size),
'X-Upload-Content-Type': 'video/*',
'Content-Type': 'application/json; charset=UTF-8'
}
)
However, that request returns a HTTP/400 with a body that says:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "badContent",
"message": "Media type 'application/json; charset=UTF-8' is not supported. Valid media types: [video/*, application/octet-stream]"
}
],
"code": 400,
"message": "Media type 'application/json; charset=UTF-8' is not supported. Valid media types: [video/*, application/octet-stream]"
}
}
That doesn't make any sense to me. Somehow, it confuses the "Content-Type" header with that "X-Upload-Content-Type" and I don't know why that is. I tried passing the HTTPS traffic through a HTTP proxy, but httplib2 does not seem to play nicely with the HTTP proxy I use (Charles).
Ideas, anyone?
Thanks heaps,
Soeren