DotNetDevs / Synology

Synology Client for Build-In APIs for .NET Projects
https://dotnetdevs.github.io/Synology/
Apache License 2.0
55 stars 18 forks source link

[BUG] encode query parameters #129

Open Cologler opened 4 years ago

Cologler commented 4 years ago

Currently, the query parameters of the request was not be encoded, this may cause some bug if any parameter contains special chars like &, or #, etc.

When I create a download task, I have to manually encode the magnet link:

ServiceProvider.GetService<ISynologyConnection>()
    .DownloadStation()
    .Task()
    .CreateAsync(new TaskCreateParameters{ Uri = System.Web.HttpUtility.UrlEncode(url) });