H1 Pro的http请求不上
爽朗的吉良 发布于2020-11 浏览:5060 回复:2
0
收藏

设置了ip为192.168.0.88,但是http://192.168.0.88:8080 连不上,浏览器192.168.0.88能连上并正常使用,但http://192.168.0.88/deviceManage/getDeviceID、http://192.168.0.88:8080/deviceManage/getDeviceID等都是未找到

收藏
点赞
0
个赞
共2条回复 最后由用户已被禁言回复于2022-03
#3深圳九曲范深回复于2020-12

按照官网给的文档对照下看看,是不是哪里设置错误

0
#2爽朗的吉良回复于2020-12

原来是post过去的数据格式弄错了,尴尬···现在一切正常中

import hashlib
import requests
import json


def getDeviceID():
    # 请求设备id
    """
    Url:
        http://设备IP:8080/deviceManage/getDeviceID
    JSON格式
    Post:
    {
        "pass":"pass"
    }
    Response:
    {
        "device_id": "BD12345678901234",
        "code": true,
        "log": "'getDeviceID' success!"
    }
    建了个QQ群,欢迎大家一起交流度目人脸套件的采坑经验:701293885
    """
    url = 'http://192.168.0.88:8080/deviceManage/getDeviceID'
    psw = hashlib.md5('123456'.encode(encoding='UTF-8')).hexdigest()
    params = json.dumps({
        "pass": psw
    })
    r = requests.post(url, params)
    print(r.text)


if __name__ == '__main__':
    getDeviceID()
0
快速回复
TOP
切换版块