之前用:
【已解决】Mac中用Charles抓包夜神安卓模拟器中Android的app的数据
抓取到一个https的接口:
![](https://www.crifan.com/files/pic/uploads/2021/03/266b3aa6ca1a457a9cf41d55ed507110.jpg)
现在打算去用Postman模拟看看效果,能否直接拿来使用。
因为担心会不会需要额外的cookie,或者字段才能正常访问。
结果报错:
Could not get any response There was an error connecting to https://childapi.qupeiyin.com/course/detail_new?sign=×tamp=1536312622&uid=0&auth_token=0&course_id=51818. Why this might have happened: * The server couldn't send a response: Ensure that the backend is working properly * Self-signed SSL certificates are being blocked: Fix this by turning off 'SSL certificate verification' in Settings > General * Proxy configured incorrectly Ensure that proxy is configured correctly in Settings > Proxy * Request timeout: Change request timeout in Settings > General
![](https://www.crifan.com/files/pic/uploads/2021/03/02acd9eb0cf34f3282ebc8b85a0aef3a.jpg)
加上sign参数,问题依旧:
![](https://www.crifan.com/files/pic/uploads/2021/03/0d9d2b9cd8c84849acc63874a913903c.jpg)
加上其他的Header,问题依旧:
![](https://www.crifan.com/files/pic/uploads/2021/03/2984d44be511451ea85dd85a663b802b.jpg)
然后去试了试:
turning off ‘SSL certificate verification’ in Settings > General
![](https://www.crifan.com/files/pic/uploads/2021/03/df78e6dbb370421c9a825314c371f619.jpg)
![](https://www.crifan.com/files/pic/uploads/2021/03/fc3579540a6646c7bb4a62249fcfa891.jpg)
关闭:
SSL certificate verification
![](https://www.crifan.com/files/pic/uploads/2021/03/b3272887f6be4affaea71114d0c369a4.jpg)
然后再去试试,发现就可以了:
![](https://www.crifan.com/files/pic/uploads/2021/03/5a3c8cc5f20748fbb3d9d06182ef4211.jpg)
然后去除掉url中sign参数,去掉header:
![](https://www.crifan.com/files/pic/uploads/2021/03/ed4696f8b9e54958acf2f018810a4a73.jpg)
也是可以的:
![](https://www.crifan.com/files/pic/uploads/2021/03/c5548fc485ed40df8cdefe51d30039ec.jpg)
【总结】
Postman中默认是开启了SSL验证的,导致此处访问https出错
Could not get any response There was an error connecting to
去:
Postman->Preferences->General-> 关闭:SSL certificate verification
即可正常访问https的接口。
转载请注明:在路上 » 【已解决】Postman模拟调用https接口出错:Could not get any response There was an error connecting to https