I inherited a WCF project containing some badly constructed routes (which work) that I need to migrate into a new NancyFx project. I need to be able to define routes in my Nancy app that respond to the same GET requests. I cannot change the routes for the time being.
In the WCF project, a GET request to ...
http://localhost:12345/webapi/GetUsers?UserId=567&Language=en
matches this UriTemplate:
UriTemplate = "GetUsers?UserId={userId}&Language={language}
I was hoping this would be the equivalent in Nancy
Get["/GetUsers?UserId={userId}&Language={language}"] = p => { ... }
but the same GET request results in a 404.
Is there a way to structure my Nancy route to respond to this GET request? If not, any work-arounds?
I know this is horrible but its temporary until I can schedule time with our UI team to rewrite the front-end to call proper rest-full URLs.