I have a url with the array parameter as follows: "?fields=[%27name%27,%27age%27,%27address%27]". I get a 500 error message when I put that string into the Interface parameter. Can anyone help me with this problem? Here is my code:
public interface IRestClient
{
[Get ("/ api / v1.0 / persons")]
Task GetPersons (string fields);
}
Here is the parameter string I want to include:
string fields = "%5B%27name%27%2C%27phone%27%2C%27mobile%27%2C%27website%27%2C%27street%27%2C%27street2%27%2C%27email%27%2C%27id%27%2C%27commercial_company_name%27%2C%27company_name%27%2C%27image%27%5D";
↧
Refit - How to set string array parameters for url
↧