diff --git a/fusionauth-netcore-client/src/io/fusionauth/DefaultRESTClient.cs b/fusionauth-netcore-client/src/io/fusionauth/DefaultRESTClient.cs index f8f23959..fd68be22 100644 --- a/fusionauth-netcore-client/src/io/fusionauth/DefaultRESTClient.cs +++ b/fusionauth-netcore-client/src/io/fusionauth/DefaultRESTClient.cs @@ -36,7 +36,7 @@ class DefaultRESTClient : IRESTClient { public String uri = ""; - public Dictionary parameters = new Dictionary(); + public List> parameters = new List>(); public Dictionary headers = new Dictionary(); @@ -146,7 +146,7 @@ public override IRESTClient withUri(string uri) { * @param value The value of the parameter, may be a string, object or number. */ public override IRESTClient withParameter(string name, string value) { - parameters[name] = value; + parameters.Add(new KeyValuePair(name, value)); return this; } diff --git a/fusionauth-netcore-client/src/io/fusionauth/IRESTClient.cs b/fusionauth-netcore-client/src/io/fusionauth/IRESTClient.cs index 32d6aa15..cc56e22a 100644 --- a/fusionauth-netcore-client/src/io/fusionauth/IRESTClient.cs +++ b/fusionauth-netcore-client/src/io/fusionauth/IRESTClient.cs @@ -15,6 +15,8 @@ */ using System; +using System.Collections.Generic; +using System.Linq; using System.Net.Http; using System.Threading.Tasks; @@ -101,6 +103,14 @@ public IRESTClient withParameter(string name, object value) { return withParameter(name, value.ToString()); } + public IRESTClient withParameter(string name, IEnumerable value) + { + if (value == null) + return this; + + return value.Aggregate(this, (current, val) => current.withParameter(name, val)); + } + /** * Run the request and return a promise. This promise will resolve if the request is successful * and reject otherwise.