asifshaon / google-api-dotnet-client

Automatically exported from code.google.com/p/google-api-dotnet-client
Apache License 2.0
0 stars 0 forks source link

Need to get the metadata response from an Upload #210

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Currently, upload does not allow the user to retrieve the result of a response. 
The upload class needs to be improved to enable this functionality.

Original issue reported on code.google.com by asky...@google.com on 2 May 2012 at 5:57

GoogleCodeExporter commented 9 years ago
http://codereview.appspot.com/6165045/

Original comment by asky...@google.com on 2 May 2012 at 8:40

GoogleCodeExporter commented 9 years ago

Original comment by asky...@google.com on 3 May 2012 at 6:14

GoogleCodeExporter commented 9 years ago

Original comment by asky...@google.com on 3 May 2012 at 6:14

GoogleCodeExporter commented 9 years ago
Hello,

This is not yet fixed as the response should be read at the end of the 
resumable upload session, not at the beginning.
In SendChunk, the code should check for a "201" from the API, reads the 
response body and fire the ResponseReceived event if necessary.

Also, calling Upload with an empty body (Content-Length == 0) doesn't work as 
the API is expecting 2 requests but only one is sent (the first one). The 
Upload method should check for the stream length and eventually call the 
"Fetch" method if it is 0.

Thanks!
Alain

Original comment by ala...@google.com on 3 May 2012 at 11:45

GoogleCodeExporter commented 9 years ago
reopening based on comment #4

Original comment by asky...@google.com on 4 May 2012 at 6:01

GoogleCodeExporter commented 9 years ago
http://codereview.appspot.com/6199044/

Original comment by asky...@google.com on 4 May 2012 at 7:33