Get Method Of Frisby Does Not Work With Https
I am new to frisby test. today i found I can't access https://ip address from friby api for example: frisby.create('my test').get('https://199.59.148.20') output: connect error fr
Solution 1:
This is beacuse the unsafe connection (non-trusted SSL certificate). If you open same URL in a browser, it will ask for confirmation before to continue with the insecure connection.
To do the same thing in frisby
, add a second param to .get(...)
method to specify strictSSL = false
as follows:
var frisby = require('frisby');
frisby.create('Get a https resource')
.get('https://199.59.148.20', { strictSSL: false })
.expectStatus(200) // For this case/IP-address this fails as it returns a 404
.inspectBody()
.toss();
Post a Comment for "Get Method Of Frisby Does Not Work With Https"