Reputation: 35
I need to call a webAPI with string array as a parameter.
I have a string array . I need to call this api from c#
string[] str;
str[0]= "abc";
str[1]= "xyz";
how can I create the api request call like given below.
http://localhost:59511/api/Values?str[]="abc"&str[]="xyz"
Upvotes: 0
Views: 145
Reputation: 2071
You can format the request like so:
http://localhost/api/values?str=abc&str=xyz
Upvotes: 1