Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Request.GetQueryNameValuePairs() for asp.net core controller

$
0
0

Hi all

In the previous version of Web API, when I was sending parameters with a get verb like the following lines in Angular

return $http.get('/api/myController/get', options).then(function (response) {
       return response.data;
})

then in my controller I was using the following lines to get the parameters

var options = Request.GetQueryNameValuePairs()
	.ToDictionary(x => x.Key, x => JsonConvert.DeserializeObject(x.Value));

This code doesn;t seems to work in ASP.NET core. My question is do you know what is the equivalent for asp.net core?
Thanks a lot


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>