Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to make this Web Api to work?
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 5.0
OS:
Windows 10
Database:
MS SQL Server
Miscellaneous
Thread ID:
01658678
Message ID:
01658730
Views:
53
Why are you passing data (a dictionary) on the URL via [HttpGet]? SHouldn't that go into an [HttpPost] and then [FromBody]? This seems bad behavior for a REST service.

+++ Rick ---

>>I think you're essentially receiving a dictionary and a dictionary is JSON serialized as a map:
>>
>>
>>{
>>   "key": "value",
>>   "key2:" "value"
>>}
>>
>>
>Hi Rick,
>
>My problem was to correctly pass the object using the HttpGet method. After some googling around I found I need to use [FromUri] attribute to pass such parameter correctly.
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform