asp.net mvc - Change the querystring pattern of web api -


if put variable (say myvariable) in action method such as

[routeprefix("api/myservice")]       public class myapicontroller : apicontroller {     [route("")]     [httpget]     public httpresponsemessage getvar([fromuri] string myvariable = "")     {         var response = request.createresponse(httpstatuscode.ok, "");         return response;     } 

} , api's url like: api/myservice?myvariable={ myvariable }

but want see like: api/myservice?myvariable={ var } var or else rather myvariable.

how can without changing route table?


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -