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:
01658730
Vues:
52
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?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform