cdanielm58 / 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

Allow InsertRequest to perform method request without media upload. #216

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The service generator uses resumable upload to implement all upload requests, 
for instance, the Drive API defines an InsertRequest class that inherits from 
ResumableUpload:

http://code.google.com/p/google-api-dotnet-client/source/browse/Current/Generate
d/Source/Google.Apis.Drive.v1.cs?repo=contrib#791

In some cases, e.g. creating a Drive folder, it is required to use simple 
upload instead and a 0-byte resumable upload won't be accepted.

The library should allow developers to use both simple and resumable upload.

Currently, we only have:

...
FilesResource.InsertRequest request = service.Files.Insert(body);
request.Upload(stream, mimeType);
File file = request.ResponseBody;

We also need to be able to use the following:

...
File file = service.Files.Insert(body).Fetch();

Original issue reported on code.google.com by ccherub...@google.com on 7 Jun 2012 at 6:18

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

Original comment by asky...@google.com on 20 Jun 2012 at 5:35

GoogleCodeExporter commented 9 years ago
old issue

Original comment by pele...@google.com on 26 Apr 2013 at 7:47