Git Product home page Git Product logo

Comments (3)

carlosantoniodasilva avatar carlosantoniodasilva commented on July 18, 2024

@xformerfhs have you been able to get httpclient working with an https proxy with just that change? I was just trying it locally here and while it works on curl, it doesn't work with httpclient by monkey-patching just that to allow setting https proxy config, it hangs and times out.

I'll look some more, but thought I'd drop a comment here in the meantime (I also know this is a 2+ year old issue so you may not even remember anymore :)

from httpclient.

xformerfhs avatar xformerfhs commented on July 18, 2024

@carlosantoniodasilva: Thanks for your comment. I did not actually try that change. I remember that I looked further into this and realized that I would have to dig really deep into ruby's http internals and I did not want to do this. It was meant as a suggestion to the Ruby developers. I really did not (and do not) understand why one would forbid to use a secure method and only allow an unsecure method.

First I refactored my client to call curl instead of using ruby's http client like this:

stdoutResult, stderrResult, status = Open3.capture3('curl --connect-timeout 9 --max-time 20 --fail --silent --show-error --proxy "https://some.proxy.com:12345" --proxy-user "aproxyuser:aproxypwd" --header "Accept: application/json, text/javascript, */*; q=0.01" --header "Connection: keep-alive" --header "Accept-Encoding: gzip, deflate" --header "Language: en-US" --write-out "|%{response_code}" "' + requestURI + '?' + requestParameters + '"')

Finally I switched programing language and implemented my client in Go. That worked perfectly.

from httpclient.

carlosantoniodasilva avatar carlosantoniodasilva commented on July 18, 2024

@xformerfhs makes sense, thanks for sharing.

I don't think shelling out will be an option for me in this case, but I might give it a shot as well. I am looking into a few other alternatives in the meantime. Thanks again!

from httpclient.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.