Hi There!
I am trying to figure out how to post an object that contains dictionary<string,object> to an ASP.NET Web API Controller.
The dictionary<string,object> needs to contains a file.
The endpoint takes an object, so I am trying to figure out how to get this working using x-www-form-urlencoded or raw.
My endpoint object looks like this:
public class PostData
{
public string EntityName { get; set; }
public object EntityId { get; set; }
public string MethodName { get; set; }
public Dictionary<string, object> Parameters { get; set; }
}
I have been trying figure out how to set they keys for dictionaries, can you help out? I need:
A dictionary named “Parameters” to contain:
- FileName = “My file name”
- FileExtension = “zip”
- FileContent = The content of the file
Thank you!