0

I am trying to test an REST API on my local machine using frisby.js . It throws the following error.

Error: tunneling socket could not be established.

The machine address is something like 'https://machine_name:8443'

Harshit
  • 711
  • 1
  • 9
  • 29

1 Answers1

1

It seems that you are behind a proxy. Then, to make your frisby test working, you need to apply proxy configuration as follows:

var frisby = require('frisby');

frisby.globalSetup({
    request: {
        proxy: 'http://xx.xx.xx.xx:yyyy' // Provide proxy info (host, port) here
    }
});

frisby.create('Your spec description here')
    .get('https://machine_name:8443')
    .expectStatus(200)
    .toss();

Note also that you are using HTTPS protocol. Then you may find useful my answer in this post in case you have problems with SSL certificates

Community
  • 1
  • 1
leo.fcx
  • 6,137
  • 2
  • 21
  • 37