GithubHelp home page GithubHelp logo

httpclient support about fakeweb HOT 5 OPEN

chrisk avatar chrisk commented on June 2, 2024
httpclient support

from fakeweb.

Comments (5)

nbibler avatar nbibler commented on June 2, 2024

So, I put together my own patch which adds this support - however - it's certainly not for mainline use as it is specific to httpclient + soap4r at the moment: http://gist.github.com/206226

However, it raised the interesting idea of abstracting the generated Net::HTTPResponse object to fit other libraries. In this case, I had to extend the response to carry status and content methods. It may be more useful to have a custom response object come back through FakeWeb.response_for, in most cases the current Net::HTTP-like object, but for httpclient, for instance, a slightly modified version. If that were available, I wouldn't have had to monkey with Net::HTTPHeader and HTTPClient in this patch.

Just a thought.

from fakeweb.

chrisk avatar chrisk commented on June 2, 2024

Note to self, httpclient is now on github. http://github.com/nahi/httpclient

from fakeweb.

woahdae avatar woahdae commented on June 2, 2024

implemented the patch in a branch on my fork:

http://github.com/woahdae/fakeweb/commit/a45da6465ec12de5ccf6976e9245fcac8476e07f

working in tests relying on soap4r

from fakeweb.

woahdae avatar woahdae commented on June 2, 2024

(would have sent a pull request, but didn't want to write tests and don't know how to make it generic)

from fakeweb.

carlosantoniodasilva avatar carlosantoniodasilva commented on June 2, 2024

Hey guys, I just runned into the same issue. I need to mock soap4r gem and it uses httpclient. I found this thread, that points to a fork which has the specific changes to fake httpclient, but it seems a bit older (January 05, 2009)..

http://groups.google.com/group/fakeweb-users/browse_thread/thread/7893b121c7c2414f/7309c3b6d7a5fe9c

Do you guys have any news about it?
Thanks!

from fakeweb.

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.