I have a module with the following GET API:
Get["/filesignature/{relativePath}"] = GetFileSignature;
And I'm trying to use WebClient.DownloadData with the following:
var myPath = @"mydirectory\myfile.exe";
client.DownloadData("filesignature/" + HttpUtility.UrlEncode(myPath));
I see that it is encoded before filesignature/mydirectory%5cmyfile.exe, so it looks right.
However, I return 404. I tried to do this in a browser, and this is the same. When I delete %5c, my breakpoint in the call is reached. Therefore, there seems to be a problem with backslash encoding.
Any tips?
source
share