Giter Site home page Giter Site logo

Ignore some requests? about vcrpy HOT 5 CLOSED

kevin1024 avatar kevin1024 commented on May 21, 2024
Ignore some requests?

from vcrpy.

Comments (5)

kevin1024 avatar kevin1024 commented on May 21, 2024 1

mm nice, I like the Ruby VCR API.

from vcrpy.

kevin1024 avatar kevin1024 commented on May 21, 2024

I'm trying to figure out what the API for this should look like. It's hard to disable the patch inside the app code without being able to modify the app code itself.

from vcrpy.

simon-weber avatar simon-weber commented on May 21, 2024

It's probably easiest not to actually disable the patch - you're right, that seems difficult - but to introduce a per-host filter in the stub. I'm not too familiar with the inner workings of httplib, but if every set of requests to a host is preceded by a call to connect, you could use it to set a per-stub flag to pass requests through.

Then we could expose something like with_cassette(ignore_hosts=['localhost', '127.0.0.1']).

from vcrpy.

jashugan avatar jashugan commented on May 21, 2024

The Ruby VCR lib has ignore some requests implemented. I am particularly interested in ignore_localhost option, however just making available an ignore_request call back or handler would be great as well.

from vcrpy.

simon-weber avatar simon-weber commented on May 21, 2024

💖

from vcrpy.

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.