1

A sample route in Nancy can be like:

Get["/method/key1={value1}/key2={value2}"]

which can be reached by calling it as:

/method/key1=foo/key2=bar

I want to write the querystring in below manner:

method?key1=value1&key2=value2

What would be the route for this?

ng-newbie
  • 35
  • 4

1 Answers1

3

It will be the following route:

GET["/method"] => x
{
   var key1 = Request.Query.key1;
   var key2 = Request.Query.key2;
};

Where Query is DynamicDictionary.

Related Questions:

Community
  • 1
  • 1
Igor Yalovoy
  • 1,715
  • 1
  • 17
  • 22