使用此代码我无法将数据发布到api(asp.net MVC最新版本)。 可能是什么问题呢? 我应该设置特定的标题吗?
Using client As New Net.WebClient
Dim reqparm As New Specialized.NameValueCollection
reqparm.Add("DeviceId", "devicetest")
reqparm.Add("Message", "messagetest")
Dim responsebytes = client.UploadValues("http://xxx.xxx.com/api/notification", "POST", reqparm)
Dim responsebody = (New Text.UTF8Encoding).GetString(responsebytes)
End Using