以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助]这段代码在我电脑上没有任何问题,在win xp 电脑上老是报错  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=144755)

--  作者:zto001
--  发布时间:2019/12/28 20:45:00
--  [求助]这段代码在我电脑上没有任何问题,在win xp 电脑上老是报错
[求助]这段代码在我电脑上没有任何问题,在win xp 电脑上老是报错

Dim 页面 As Integer
Dim hc As New HttpClient("https://jinshuju.net/api/v1/forms/Tqo8jR/entries")
hc.Accept = "application/json"
hc.Headers.Add("Authorization","Basic " + Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes("rU17h4PuYCqr7fd4YrRvbg:t8FjajwxQ8a3ikGjb_SK-w")))
hc.C
MessageBox.Show(hc.GetData())


这是返回的结果
\'{"total":2,"count":2,"data":[{"serial_number":1,"field_1":"老两口","field_2":"15616185475","field_3":"老两口15616185475","x_field_weixin_nickname":"","x_field_weixin_gender":"","x_field_weixin_country":"","x_field_weixin_province_city":{},"x_field_weixin_openid":"","x_field_weixin_headimgurl":"","creator_name":"18570387961","created_at":"2019-12-23T12:59:54.295Z","updated_at":"2019-12-23T12:59:54.295Z"},{"serial_number":2,"field_1":"连连看","field_2":"15616161616","field_3":"换算几点呢看对方额回复的","x_field_weixin_nickname":"","x_field_weixin_gender":"","x_field_weixin_country":"","x_field_weixin_province_city":{},"x_field_weixin_openid":"","x_field_weixin_headimgurl":"","creator_name":"","created_at":"2019-12-25T04:54:21.588Z","updated_at":"2019-12-25T04:54:21.588Z"}],"next":null}


但是在xp电脑上什么都没返回
还出现这样的错误

.NET Framework 版本:4.0.30319.1022
Foxtable 版本:2019.12.17.18
错误所在事件:窗口,手机下单,AfterLoad
详细错误信息:
Error reading JObject from JsonReader. Path \'\', line 0, position 0.

.NET Framework 版本:4.0.30319.1022
Foxtable 版本:2019.12.17.18
错误所在事件:
详细错误信息:
The underlying connection was closed: An unexpected error occurred on a send.
Received an unexpected EOF or 0 bytes from the transport stream.







--  作者:zto001
--  发布时间:2019/12/28 20:46:00
--  
Dim 页面 As Integer
Dim hc As New HttpClient("https://jinshuju.net/api/v1/forms/Tqo8jR/entries")
hc.Accept = "application/json"
hc.Headers.Add("Authorization","Basic " + Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes("rU17h4PuYCqr7fd4YrRvbg:t8FjajwxQ8a3ikGjb_SK-w")))
hc.ContentType = "application/json"
MessageBox.Show(hc.GetData()) 

--  作者:有点蓝
--  发布时间:2019/12/29 20:58:00
--  
现在没有XP系统测试,明天到公司再试试
--  作者:有点蓝
--  发布时间:2019/12/30 10:39:00
--  
 XP不支持https接口,问接口服务商有没有http接口 ,比如:http://jinshuju.net/api/v1/forms/Tqo8jR/entries
[此贴子已经被作者于2019/12/30 10:38:58编辑过]