0

It's easier to consume the data with the query string http://www.contoso.com/student?id=12345

But how do you consume the data with abc%5Bname%5D on the controller? http://www.contoso.com/student?abc%5Bname%5D=john

xenos
  • 236
  • 1
  • 11
  • Does this answer your question? [URL Encoding using C#](https://stackoverflow.com/questions/575440/url-encoding-using-c-sharp) – Mosia Thabo Apr 25 '20 at 00:15

1 Answers1

1

You want HttpUtility.UrlDecode()

var url = "http://www.example.com/student?abc%5Bname%5D=john";
url = HttpUtlity.UrlDecode(url);
Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
  • How do you consume this on the API controller? if the request is coming to your local host? – xenos Apr 27 '20 at 16:11