溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

python單個接口測試記錄

發(fā)布時間:2020-08-05 12:35:09 來源:網(wǎng)絡(luò) 閱讀:587 作者:知止內(nèi)明 欄目:軟件技術(shù)
#encoding=utf-8
import chardet
import urllib
import requests
import json
import os
import hashlib

        '''校驗短信驗證碼到接口'''
def checkVCodeBeforeLoginNew():
    head = {
            'Content-Type': "application/json",
            'X-Toon-User-ID': '9000037',
            'X-Toon-User-Token': '16c9f975-',
            'X-Toon-User-Agent': 'platform'
        }
    print "校驗短信驗證碼到接口"
    data = json.dumps({"channel":"string","code":"string","deviceName":"string","deviceToken":"string","fromWhere":"string","idfa":"string","imei":"string","macAddress":"string","mobile":"21410665218","mobileVerfiyCode":"1111","teleCode":"0086","type":0,"uuid":"34545"})
    r = requests.post('{ip}', data= data,headers=head)
    print r.status_code
    print r.text
    #print type(r.json())
    #print str(r.json())

校驗短信驗證碼到接口
200
{"meta":{"code":0,"message":"success"},"data":{"userId":9000037,"userName":"21410665218","token":"16c9f975-d5d7-4cef-9a12-fb8dc5a81792","personToken":"2f06e1c8f8372f1d2e87e89334177d28bc5453c80c53664c2ffd32700d84b26595e646b2c87a7ab1cc121271eecae42891167a68e65b5d573fb87eb5c446e3e3458d74acee38ef21dfacc4eff32140235ad96ba634ab66b686b2946ee45f726b","status":"1"}}

向AI問一下細節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI