Giter Site home page Giter Site logo

Interceptors? about gaxios HOT 3 CLOSED

googleapis avatar googleapis commented on July 28, 2024 2
Interceptors?

from gaxios.

Comments (3)

joseglego avatar joseglego commented on July 28, 2024 1

I'm looking for interceptors and I've found this issue. Even when it's closed. I'd like to ask: I've checked the code. And it looks like these adapters (the name for interceptors) are only for response interceptors.

But, in that case, we'd be missing request interceptors, right?

Case of Use: You have an old API or a third-party API and this API has all attributes in snake case (for input and output)
In this case, I'd like to be able to use camelize (after receiving my response), but also to snake-case the input form (before sending the request).

You can check as reference: https://github.com/axios/axios#interceptors
Would this be useful? 🤔

from gaxios.

jhoch avatar jhoch commented on July 28, 2024

I am interested in instrumenting requests made with gaxios. I saw this issue where someone mentioned instrumentation, but it's not obvious to me how to do that trivially with adapter, since the "default adapter" relies on a few private methods, so wrapping it is difficult (adapter is still great for testing of course). The better approach to instrumentation, to me, feels like interceptors

from gaxios.

bcoe avatar bcoe commented on July 28, 2024

@joseglego please don't hesitate to open a feature request.

from gaxios.

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.