请问老师,这个ContentLength 字节写入请求流是什么意思?
此主题相关图片如下:错误.png
Dim hc As New HttpClient("https://oapi.dingtalk.com/topapi/message/corpconversation/asyncsend_v2?access_token = 8eae690cd19338bf8a9632a4467caad1")
Dim jo As New JObject
jo("agent_id") = "1373649751"
jo("userid_list") = "01531106431720838456"
jo("msgtype") = "text"
jo("text") = New JObject
jo("text")("content") = "今晚加班"
hc.Content = jo.ToString()
jo = JObject.Parse(hc.GetData())
If jo("errcode") = "0" Then
MessageBox.show("消息发送成功!")
Else
MessageBox.show("消息发送失败,原因:" & vbcrlf & jo("errmsg").ToString)
End If
必须先将 ContentLength 字节写入请求流,然后再调用 [Begin]GetResponse。