vlucas / frisby

Frisby is a REST API testing framework built on Jest that makes testing API endpoints easy, fast, and fun.
http://frisbyjs.com
1.52k stars 201 forks source link

Using frisby with a proxy #246

Closed blowsie closed 7 years ago

blowsie commented 9 years ago

When using frisby inside my corporate proxy, frisby returns expected 500 to be 200.

I tried to configure request to use a proxy with the following code but saw no resolution.

frisby.globalSetup({ // globalSetup is for ALL requests
  request: {
    proxy: 'http://127.0.0.1:43128'
  }
});

I have confirmed that frisby works as intended when I switch to a network that uses no proxy.

Am I doing something wrong here?

sasikanth commented 9 years ago

I have used proxy in frisby and it worked fine for me.

  1. Check if proxy url/port is correct. Is your port 43128 or 3128 ?
  2. Check if your actual outgoing request contains proxy, by using .inspectRequest()
  3. I think your proxy "http://127.0.0.1:43128" is by CNTLM. If yes, is your cntlm started ?, Are you able to see transactions on cntlm command window ?
  4. Will you be able to share output of .inspectBody() and .inspectResponse() ?

~ Sasi

blowsie commented 9 years ago

@sasikanthnimmagadda

Thanks for the response.

  1. Yes it is 43128
  2. -
  3. Yes it is CNTLM :+1:
  4. I will aim to do this sometime this week
vlucas commented 7 years ago

Proxies work with v2 and the fetch() API.