使用jenkins做接口测试,不论使用postman,还是自己python编写代码,get、pots接口都需要鉴权,这个可以在每个页面的右下角的rest api里查看你想调用的接口。

   python 使用:

requests.get(, ={},= (,)).text
 = r = requests.post(,={},= (,))



使用get可以访问正常,使用post 一直报403  ‘ No valid crumb was included in the request’
解决:需要再jenkins里面配置 :系统管理->Configure Global Security->防止跨站点请求伪造  勾选去除。

post就可以正常访问了。