Skip to content

HTTP表单方式提交

dy.Zhuang edited this page Apr 19, 2021 · 4 revisions

大部分 NXcloud 的接口都是以这种方式提交的。

  • 需要设置 HTTP METHOD 为 POST
    HttpURLConnection connection = (HttpURLConnection) url.openConnection();
    connection.setRequestMethod("POST");
  • 需要添加 Content-Type: application/x-www-form-urlencoded
    connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
  • 请注意对提交的字段做正确的 urlencode
    String body = "phone=8411111111&content=" + URLEncoder.encode("您的 短信内容 ,您的 短链内容", "UTF-8") + "&.....";

一个使用 postman 提交的示例截图

使用postman截图

简介

短信

语音

云呼叫中心(NXLink)

云呼叫中心(AI自动外呼)

Flash Call

短链

邮件验证码

DID号码

通用

号码检测

WhatsApp

Viber

Zalo ZNS

Super Message API

隐私号(旧)

PNS

坐席(旧版)

AI Agent

Clone this wiki locally