随笔分类 -  requests

python中requests库的post请求 4种类型参数
摘要:用python来验证接口正确性,主要流程有4步: 1 设置url 2 设置消息头 3 设置消息体 4 获取响应 5 解析相应 6 验证数据 Content-Type的格式有四种:分别是application/x-www-form-urlencoded(这也是默认格式)、application/jso 阅读全文

posted @ 2020-10-26 09:30 测试好家伙 阅读(33790) 评论(0) 推荐(3)

python-接口编写-get和post,真假接口
摘要:from flask import request from flask import Flask from flask import jsonify app = Flask(__name__) from unittest_1.common.common import mysql app.confi 阅读全文

posted @ 2020-07-22 09:41 测试好家伙 阅读(284) 评论(0) 推荐(0)

python requests写post和get请求
摘要:import requests def test_huo_qu_ke_fu_phone():#获取客服电话 url='http://ip/auth/app/whiteApi/v1/getServicePhone' a= requests.request("get",url) return a.tex 阅读全文

posted @ 2020-07-21 19:05 测试好家伙 阅读(661) 评论(0) 推荐(0)

python接口自动化--解决接口需要token的问题
摘要:import requests def get_login():#用于测试的登录 url='http://ip地址/auth/app/whiteApi/v1/login' data={"password": "dc483e80a7a0bd9ef71d8cf973673","username": "1 阅读全文

posted @ 2020-07-17 09:53 测试好家伙 阅读(1024) 评论(0) 推荐(0)

导航