Skip to content

Instantly share code, notes, and snippets.

@thecodejunkie
Created September 9, 2014 18:19
Show Gist options
  • Save thecodejunkie/a64abf8b6f96607ba038 to your computer and use it in GitHub Desktop.
Save thecodejunkie/a64abf8b6f96607ba038 to your computer and use it in GitHub Desktop.
Dynamics and async put
Put["/put/{name}", true] = async (parameters, ct) =>
{
var q = parameters.name;
var z = (string)parameters.name;
return 200;
};
PUT http://localhost:59017/put/andreas HTTP/1.1
User-Agent: Fiddler
Host: localhost:59017
content-length: 0
@philcleveland
Copy link

What I found is that if I try to quick watch parameters.name on line 3 I get an exception, but if I pull it into a local var like you did it seems fine. I think this is either a VS issue....or an issue with me not understanding dynamic very well. Either way, I pulled the value into a local and all is well. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment