-
Hi HeyAPI people, I need to conditionally pass in some headers to certain requests. From reading other some issues and comments I gather that I need to use the OpenAPI object but where to I get the object and where do I pass it in? Thanks in advanced! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hey @kingsley, the object is in your output folder which is |
Beta Was this translation helpful? Give feedback.
-
@kingsley let is know if that solves your problem! Thanks for the interest in the package. |
Beta Was this translation helpful? Give feedback.
Hey @kingsley, the object is in your output folder which is
import { OpenAPI } from 'src/client'
if you use the same value as in docs. However, I am not sure you need it to do what you're trying to do. You can modify requests directly in interceptors, so you could add headers to your request as needed. Modifying OpenAPI object changes values for every request, that doesn't sound ideal in your case.