Created
May 2, 2013 11:52
-
-
Save ajtowf/5501725 to your computer and use it in GitHub Desktop.
WebApi FromBody/ParseQuery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[HttpGet] | |
public HttpResponseMessage Foo([FromBody]MyModel bar) | |
{ | |
var queryParams = HttpUtility.ParseQueryString(Request.RequestUri.Query); | |
string q = queryParams["q"]; | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment