找回密码
 加入
搜索
查看: 898|回复: 2

[网络通信] post 问题

[复制链接]
发表于 2022-1-4 13:30:03 | 显示全部楼层 |阅读模式
http post 返回的数据中  ,中文变乱码 ,需要怎么改,请求头里面要咋加上什么吗?

Func http_post($s_url) ;post   地址  入参

        $oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1")
        $oHTTP.Option(4) = 13056
        $oHTTP.Option(6) = False
        $oHTTP.Open("post", $s_url, False)         
        $oHTTP.SetRequestHeader("Content-Type", "application/json")
        $oHTTP.Send()
        If Not @error Then
                MsgBox(262144,"结果",$oHTTP.responsetext)
        Else
                MsgBox(262144,"错误","")
        EndIf
        $oHTTP = 0
EndFunc   ;==>http_post

返回的 json
{
  "code": 0,
  "msg": "èˉ·???è??è????·è?????è°???¨èˉ¥??1?3?"
}


评分

参与人数 1金钱 -30 收起 理由
afan -30 标题违规,解决了也不及时修改

查看全部评分

发表于 2022-1-4 19:31:46 | 显示全部楼层
看文档要求,我之前发过一次https://www.autoitx.com/thread-71359-1-1.html,你可以试试看能不能用
 楼主| 发表于 2022-1-5 11:12:29 | 显示全部楼层
本帖最后由 c123456789qs 于 2022-1-5 11:16 编辑
风过无痕 发表于 2022-1-4 19:31
看文档要求,我之前发过一次https://www.autoitx.com/thread-71359-1-1.html,你可以试试看能不能用

好了  谢谢
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-5-3 15:48 , Processed in 0.071050 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表