以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 求助:短信发送Java代码转换 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=130937) |
-- 作者:李孝春 -- 发布时间:2019/2/12 12:04:00 -- 求助:短信发送Java代码转换 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编辑过]
|
-- 作者:有点甜 -- 发布时间:2019/2/12 12:06:00 --
参考帮助文档:http://www.foxtable.com/mobilehelp/index.htm?page=0246.htm
只需要买了以后,改掉AppCode就搞定了,超级简单啊
Dim hc As New HttpClient("http://feginesms.market.alicloudapi.com/codeNotice?param=123456&phone=17703940712&sign=1&skin=1") |