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:
01658736
Views:
43
>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.
>

I have auto-complete textbox on the page. For this to function I need to pass the id (int) and a string. I can pass them as parameters, but I would need to hash the string then before sending to API. I was thinking that sending a simple object (KeyValuePair) would be better than sending two parameters.

I can also use a post instead of the get, but I was thinking since the purpose is to receive information and not really post anything back, get would be a better choice.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform