Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to make this Web Api to work?
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 5.0
OS:
Windows 10
Database:
MS SQL Server
Divers
Thread ID:
01658678
Message ID:
01658736
Vues:
46
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform