Foxtable(狐表)用户栏目专家坐堂 → 如何网页开发API调用代码


  共有1453人关注过本帖树形打印复制链接

主题:如何网页开发API调用代码

帅哥哟,离线,有人找我吗?
baoxyang
  1楼 | QQ | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:狐精 帖子:3313 积分:23146 威望:0 精华:1 注册:2009/3/31 11:25:00
如何网页开发API调用代码  发帖心情 Post By:2017/10/20 11:42:00 [显示全部帖子]

Dim hc As New HttpClient("http://tysbgpu.market.alicloudapi.com/api/predict/ocr_general")
hc.Headers.Add("Authorization","APPCODE " & "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
hc.C
Dim ms As New System.IO.MemoryStream
getImage(filepath).Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg)
Dim BPicture As Byte() = New Byte(ms.Length - 1) {}
BPicture = ms.GetBuffer()
Dim image As String=Convert.ToBase64String(BPicture)
Dim jo1 As New JObject
jo1("image") = UrlEncode(image)
jo1("configure") = New JObject
jo1("configure")("min_size") = 16
jo1("configure")("output_prob") = True
hc.Content = jo1.ToString()
Dim jo As New JObject
jo.Parse(hc.GetData)
调用不成功,请指教以上代码是否有问题,谢谢!!
图片点击可在新窗口打开查看此主题相关图片如下:qq图片20171020114300.png
图片点击可在新窗口打开查看

 回到顶部