I have below api url
http://myapi/api/getproduct?
These parameters will get created from below class
public class ApiParamters
{
public string id {get;set;}
public string name {get;set;}
public List<string> otherNames {get;set;}
}
If value of above parameters are
id=1
name="product1"
OtherNames="oldProduct1" and "oldProduct2"
Then api url should be as below
http://myapi/api/getproduct?id=1&name=product1&OtherNames=oldProduct1&OtherNames=oldProduct2
How to dynamically create these kind of url (GENERIC SOLUTION IS REQUREID because I have to implement simliar logic for other APIs too)