SenseNet / sn-client-dotnet

A .Net client for sensenet that makes it easy to use the REST API of the Content Repository.
https://www.sensenet.com/
GNU General Public License v2.0
7 stars 16 forks source link

Duplicate parameter in ODataRequest #34

Closed tusmester closed 4 years ago

tusmester commented 4 years ago

The ODataRequest object is responsible for converting itself to a url string. During this process we fill a dictionary with parameters. If there is a duplicate parameter (e.g. the caller provided the metadata parameter that we also want to set), an exception is thrown.

https://github.com/SenseNet/sn-client-dotnet/blob/1ba422f858823413ff162af4685ed7d7c7ff31c0/src/SenseNet.Client/ODataRequest.cs#L186

Hint: use dictionary indexer instead of Add, but make sure the precedence is correct.

kavics commented 4 years ago

~The duplicated parameter in the query-string can be an array. For example: ...?id=42&name=asdf&id=43 needs to be parsed to {"id": [42, 43], "name": "asdf"}~