Dim requestUri As String = "https://www.cryptopia.co.nz/Api/GetBalance"
Dim postData = New With { _
Key .Currency = "DOT" _
}
' Create Request
Dim request = New HttpRequestMessage()
request.Method = HttpMethod.Post
request.RequestUri = New Uri(requestUri)
request.Content = New ObjectContent(GetType(Object), postData, New JsonMediaTypeFormatter()) 'I still don't get what the hell is this
Dim sometring6 = Await request.Content.ReadAsStringAsync() '"{"Currency":"DOT"}"
所以基本上有这种匿名类型。我想要一个json字符串版本。
似乎把它放在request.Content中然后异步读取看起来很奇怪。
它使程序更难调试。
什么是更简单的方法?