Click here to Skip to main content
15,299,443 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Folks,

I have implemented attribute routing for each of action methods in My webapi.
Example of action method is:-

      public HttpResponseMessage DeleteDocument(int fileInfoId, string customerAccountName)

//*** Some body contents

Now i want to call the above action method from the client example( Fiddler Web debugger),or browser and want to pass the Url request in the below pattern:-
http://localhost:9791/api/DocumentApi/DeleteDocument?fileInfoId =12&customerAccountName="Manish"

Currently i am not able to hit the above action method by the above specified url request.
But if i use the url pattern like below:-
http://localhost:9791/api/DocumentApi/DeleteDocument/12/Manish[^], I am able to hit the above action method.But for my project requirement,I need to use the Url with query parameters only.
Please suggest me the approach,how to achieve this?
Any response will be greatly appreciated.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900