Giter VIP home page Giter VIP logo

axios-vcr's People

Contributors

jakeonfire avatar nettofarah avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

axios-vcr's Issues

Problem when request and response headers don't match

First of all, thanks for this super useful library.

I'm experiencing an issue. The cassette is never being used (although it is created when requesting without a previous casette).

Is it possible that when there is no casette, the digest is being calculated based on the response instead of the request? but then it checks the hash against the digest of the request.
In my case, headers of the request are different from the response, that's why i think this is the case, but i may be using it in a wrong way.

If you confirm the issue, i can contribute in resolving it.
Thank you

response are captured but never played back

I have this test case

it('should create a product', async () => {
        axiosVCR.mountCassette('./cassette/product/create.json');
        let create = await product.create(productName,type_id);
        product_id= create.id;
     expect(create).to.be.instanceOf(Object).and.have.property('product_id').that.equals(temp_product_id);
    });

I can see the request has been recorded under my files tree but when I try to run the test again, it fetches the real API.

Note: product.create uses axios in order to fetch the data.

Also, what's the idea of axiosVCR.ejectCassette?

Thanks

Usage with Webpack

Hello,

So this is really an interoperability question. Axios-VCR works and works well. Would be a good addition to community if was able to get a setup for it with webpack.

When I add axios-vcr to a project where I am using webpack I get an error related to fs not being defined. That is related to the fs being stubbed out by webpack.

I tried with target: "node", which runs your project as if it were in a node-server setup but then get something related to process not being found, when i define the process i end up going down a rabbit hole of other issues.

Do you have any recommendations for a setup for this to allow axios-vcr access to fs for read/write but keep everything else in the project working as is?

Thanks so much for axios-vcr and any help!

Clarify usage in README

The README says

All you need to do is [...] wrap your axios code in a VCR.use call.

and then the example code didn't use any code like that, VCR.use?

I assume this is due to API changes.

Is it bounding by mountCassette and ejectCassette instead these days?

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.