swagger-typescript-api icon indicating copy to clipboard operation
swagger-typescript-api copied to clipboard

Middleware

Open badsyntax opened this issue 3 years ago • 2 comments

Hi there. I haven't used the project yet, but it's not obvious if the generated client API supports request middleware. Is it possible to add request middleware?

badsyntax avatar Jun 10 '21 08:06 badsyntax

Hello @badsyntax Yes, it's possible if you will use --axios http client

js2me avatar Jun 10 '21 08:06 js2me

Thanks for the reply. I would prefer to use fetch tbh. I like the way the middleware is implemented in the openapi typescript fetch client. You can see an overview of how it works here: https://github.com/badsyntax/lamernews-api-client

Would you be willing to accept a PR to add middleware to the fetch template?

badsyntax avatar Jun 10 '21 09:06 badsyntax