我的网络api喜欢
public async Task<IHttpActionResult> RegisterUser(User user)
{
//User Implementation here
return Ok(user);
}
Run Code Online (Sandbox Code Playgroud)
我正在使用HTTPClient来请求web api,如下所述.
var client = new HttpClient();
string json = JsonConvert.SerializeObject(model);
var result = await client.PostAsync( "api/users", new StringContent(json, Encoding.UTF8, "application/json"));
Run Code Online (Sandbox Code Playgroud)
在我的结果请求中可以找到在客户端应用程序上实现的用户对象?