Giter Site home page Giter Site logo

Comments (9)

jordanshatford avatar jordanshatford commented on September 22, 2024 1

@kimzeevaarders it is currently not possible.

from openapi-ts.

jordanshatford avatar jordanshatford commented on September 22, 2024 1

@kimzeevaarders ahh yes. You can use interceptors. You can also set axios interceptors on the global axios instance too if you prefer that

from openapi-ts.

jordanshatford avatar jordanshatford commented on September 22, 2024

@kimzeevaarders this will be better supported with client packages. @mrlubos can provide more info

from openapi-ts.

kimzeevaarders avatar kimzeevaarders commented on September 22, 2024

Hi @jordanshatford thx for the quick feedback. Does this mean it's currently not possible, but will be in the future? Just asking since I need to go live relatively soon haha :)

from openapi-ts.

kimzeevaarders avatar kimzeevaarders commented on September 22, 2024

ah that's too bad thx for responding though 👍

from openapi-ts.

kimzeevaarders avatar kimzeevaarders commented on September 22, 2024

In case this gets implemented please let me know though, perhaps I can still switch over then 👍

from openapi-ts.

kimzeevaarders avatar kimzeevaarders commented on September 22, 2024

hmmmm @jordanshatford @mrlubos I managed to set a httpsAgent on the axiosRequestConfig over a request interceptor. It seems to do the trick:

const requestInterceptor = OpenAPI.interceptors.request;

requestInterceptor.use((request) => {
    request.httpsAgent = new Agent({
        ca: process.env.TRUSTED_CAS
    });

    return request;
});

Can you guys verify this is a good workaround or are there some caveats using this approach?

from openapi-ts.

kimzeevaarders avatar kimzeevaarders commented on September 22, 2024

Hi @jordanshatford cool, thx for confirming. No i'd rather only set it when needed, so this is perfect for me!

from openapi-ts.

kimzeevaarders avatar kimzeevaarders commented on September 22, 2024

Workaround successfull over interceptor

from openapi-ts.

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.