Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Refit - How to set string array parameters for url

$
0
0

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";


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>