求教用XMLHTTP提交JSON,在服务器端如何获取?不是.Net的哦
phpcn_u1510
phpcn_u1510 2017-05-11 15:47:15
0
1
1360

求教用XMLHTTP提交JSON,在服务器端如何获取?不是.Net的哦

先前为一客户接入梦网云通讯平台的短信接口,发送可以 urlencode json xml  但是返回只有 json 或者是xml,目前我使用的json提交  返回json

phpcn_u1510
phpcn_u1510

membalas semua(1)
phpcn_u1510

参考一下以下代码

sUrl = "http://localhost/UserLogin/"

stext = "{""A"":""1"",""P "":""9630111"",""E-mel"":""iamm"",""PassWord"":""111111""}"

 Tetapkan WS1 = Server.CreateObject("MSXML2. XMLHTTP")

        WS1.buka "POST",sUrl,False

        Ws1.Hantar(steks)

        Jika Ws1. Kemudian

4 TiJiao =BytesToBstr(Ws1.responseBody,"gb2312")

            Jika Ws1.status = 200 Kemudian

                                                   TiJiaotr 🎜>

            Tamat Jika

        Tamat Jika

Tetapkan WS1 = Tiada

Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan