'Leaf.XNet C# Sending Body as Json not working
HttpRequest httpRequest = new HttpRequest();
RequestParams reqParams = new RequestParams { };
httpRequest.IgnoreProtocolErrors = true;
reqParams["data"] = "{\"path\": \"/Prime_Numbers.txt\"}";
httpRequest.AddHeader("Authorization", " Bearer MYKEY");
httpRequest.AddHeader("Content-Type", "application/json");
Console.WriteLine(httpRequest.Post("https://api.dropboxapi.com/2/sharing/create_shared_link_with_settings", reqParams).ToString());
Im getting the following error: Error in call to API function "sharing/create_shared_link_with_settings": request body: could not decode input as JSON. I am using the dropbox api.
I saw the following: https://github.com/csharp-leaf/Leaf.xNet/issues/66 (Someone had a similar issue, but this fix did not work)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
