Foxtable(狐表)用户栏目专家坐堂 → 求助:短信发送Java代码转换


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

主题:求助:短信发送Java代码转换

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


加好友 发短信
等级:九尾狐 帖子:2472 积分:17346 威望:0 精华:0 注册:2013/1/31 0:03:00
求助:短信发送Java代码转换  发帖心情 Post By:2019/2/12 12:04:00 [显示全部帖子]

Java代码如下    请老师们帮忙转化一下转换成狐表可以运行的代码  谢谢

public static void main(String[] args) { String host = "https://feginesms.market.alicloudapi.com"; String path = "/codeNotice"; String method = "GET"; String appcode = "你自己的AppCode"; Map<String, String> headers = new HashMap<String, String>(); //最后在header中的格式(中间是英文空格)为Authorization:APPCODE 83359fd73fe94948385f570e3c139105 headers.put("Authorization", "APPCODE " + appcode); Map<String, String> querys = new HashMap<String, String>(); querys.put("param", "123456"); querys.put("phone", "13547119500"); querys.put("sign", "1"); querys.put("skin", "1"); try { HttpResponse response = HttpUtils.doGet(host, path, method, headers, querys); System.out.println(EntityUtils.toString(response.getEntity())); } catch (Exception e) { e.printStackTrace(); } }

短信第三方https://market.aliyun.com/products/56928004/cmapi027240.html?spm=5176.730005.productlist.d_cmapi027240.xy5oIm#sku=yuncode2124000000


论坛例子:【有没有别的方式呢?】
Dim hc As New HttpClient("http://feginesms.market.alicloudapi.com/codeNotice?param=123456&phone=17703940712&sign=1&skin=1")
hc.Headers.Add("Authorization","APPCODE " & "xxx请改自己xxx")
Dim jo As JObject = Jobject.Parse(hc.GetData)
Output.Show(jo.ToString)
param=123456    ‘发送的内容’
phone=17703940712  ‘发送的电话号码’
[此贴子已经被作者于2019/2/12 12:07:36编辑过]

 回到顶部