Open tomertweed opened 3 weeks ago
Hey this will be great if you can add it, this is a very useful feature!
Will be very appreciated
@tomertweed you can fully replace the fetch()
implementation of the fetch-client, have you looked at that?
just like this
import axios from "axios";
axios.interceptors.request.use(); // custom your client
const client = createClient({ baseURL, timeout, axios });
just like this
import axios from "axios"; axios.interceptors.request.use(); // custom your client const client = createClient({ baseURL, timeout, axios });
My goad is to use my client instead of interceptor of axios
I am also interested in this feature. Adding interceptors or changing the fetch implementation is not enough in my case, In addition to changing the fetch implementation, I want to be able to pass custom options to service methods, and return a different type.
@JeanVt Could you share a specific code example on what your final goals are? We're running HeyAPI's Angular Query Plugin and despite a poorly typed api we haven't faced any major issues. In fact, none related to HeyAPI in particular. We do need need to retype certain endpoints in a regular basis, from completly non-existend to just missing a few properties.
Description
Hey, I want to replace the existing request clients (http, axios...) with my own client (A wrapper of axios with extra utils and different interface) I could only find usage of the pre-built clients. Im not sure if its supported or not but I would like to be able to customize / override the client with my own. And thanks for your great project