Closed snazarian closed 8 years ago
You can add query strings when building the request. For example:
var request = client
.Drive
.Items["itemId"]
.Content
.Request(new List<Option> { new QueryOption("@name.conflictBehavior", "rename") });
I understand this should be more discoverable. I'll take the feedback to the team since we would need to find a way to incorporate it into our codegen process.
Thank you for response, but the code you provided is not buildable, because the Request() method does not accept any parameters, you can write only this way:
var request = client
.Drive
.Items["itemId"]
.Content
.Request();
Which definitely does not give a possibility to provide query string parameter.
Bleh, this is a bug.
Here's your workaround:
var requestBuilder = var request = client
.Drive
.Items["itemId"]
.Content as ItemContentRequestBuilder;
var request = new ItemContentRequest(
requestBuilder.RequestUrl,
requestBuilder.Client,
new List<Option> { new QueryOption("@name.conflictBehavior", "rename") });
Thank you for workaround, but I think this bug will be fixed in the nearest future, right?
Fixed in the latest package push.
Hi there,
The IItemContentRequestBuilder interface does not support providing optional parameters in the request. It has only the following method: IItemContentRequest Request();
It is impossible to provide "@name.conflictBehavior" optional query string parameter in the request as described here: https://dev.onedrive.com/items/upload_put.htm.
Are you going to support this? Thanks.