I sent the following content to uploads.gdata.youtube.com and got a response with status code 400.
POST http://uploads.gdata.youtube.com/resumable/feeds/api/users/liulz1/uploads HTTP/1.1
Host: uploads.gdata.youtube.com
Authorization: GoogleLogin auth=DQAAAIgAAACqJxbrRFP...-MIw2Z5F0
GData-Version: 2
X-GData-Key: key=AI39si...9scw1A
Content-Length: 0
Slug: a.mp4
User-Agent: Test Program
Pragma: no-cache
The response content is :
<?xml version='1.0' encoding='UTF-8'>
<errors>
<error>
<domain>yt:validation</domain>
<code>too_short</code>
<location type='xpath'>media:group/media:keywords/text()</location>
</error>
</errors>
But the following content will result status code 200.
POST http://uploads.gdata.youtube.com/resumable/feeds/api/users/liulz1/uploads HTTP/1.1
Host: uploads.gdata.youtube.com
Authorization: GoogleLogin auth=DQAAAIgAAAB...6jSJqEXw
GData-Version: 2
X-GData-Key: key=AI39si...9scw1A
Content-Type: application/atom+xml; charset=UTF-8
Slug: a.mp4
User-Agent: WonderShare Test Program
Content-Length: 470
Pragma: no-cache
{meta_data_xml}
I use WinInet API to send the YouTube Data API request.
Can anybody help me?