How to pass email as a parameter at the end of URL in ASP.NET MVC web API?
like below:
test.com/api/sales/getcustomerorders/[email protected]
I want to pass the email address as a parameter to the getcustomerorders action.
we can pass using query string. But I want to format the url like above.
Thanks.
In WebApiConfig make the route as "/{email}/". The end "/" will prevent you from getting No HTTP resource was found that matches the request URI ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With