复制代码 代码如下:
Dim postData As String
Dim byteArray As Byte()
Dim objWebRequest As HttpWebRequest
Dim newStream As Stream
postData = "cell=短信供应商提供信息1enterpriseId=短信供应商提供信息2mobile=手机号1,手机号2message=发送数据测试。。。"
objWebRequest = WebRequest.Create("http://xxx.yyy.com.cn/SmsSend.jsp")
objWebRequest.Method = "POST"
objWebRequest.ContentType = "application/x-www-form-urlencoded"
byteArray = System.Text.Encoding.UTF8.GetBytes(postData)
objWebRequest.ContentLength = byteArray.Length
newStream = objWebRequest.GetRequestStream()
newStream.Write(byteArray, 0, byteArray.Length)
newStream.Close()
'返回数据
Dim response As HttpWebResponse
Dim sr As StreamReader
Dim textResponse As String
response = objWebRequest.GetResponse()
sr = New StreamReader(response.GetResponseStream(), System.Text.Encoding.Default)
textResponse = sr.ReadToEnd()
您可能感兴趣的文章:- 通过第三方接口发送短信验证码/短信通知(推荐)
- NodeJS实现阿里大鱼短信通知发送
- asp.net调用飞信免费发短信(测试有效)
- 阿里大鱼简单发送短信功能.net core版
- C#代码实现短信验证码接口示例
- C#怎么实现手机短信发送功能
- java、php、C#、asp实现短信群发功能的方法
- CDMA 猫用AT命令发中文短信(C#)
- ASP.NET MVC阿里大于短信接口开发短信群发能