Open SpecLad opened 1 year ago
What config settings in Axios could be set that way? From https://axios-http.com/docs/config_defaults, I feel like only a base URL and headers can be configured.
In general, I do see a use for this, but don't think we will have time ourselves to work on this. So if anybody else is interested, we are happy to assist.
There's a bunch of stuff: https://axios-http.com/docs/req_config, https://axios-http.com/docs/interceptors.
Ok, then let's see if somebody wants to tackle this.
Hello, @Acconut. I would love to take this issue and work on it.
That's great to hear! Let me know if you need some help getting started. It should be as simple as copying https://github.com/tus/tus-js-client/blob/main/lib/browser/httpStack.js and replacing XMLHttpRequest with Axios.
Curious to see this implemented
@kalemi19 Let me know if you are interested in helping with this
Is your feature request related to a problem? Please describe. In our project we mostly use Axios for making HTTP queries, with some default settings configured globally (e.g. default HTTP headers). We also use tus-js-client, but since it uses its own HTTP stack, we have to replicate the default Axios settings into their tus-js-client equivalents. This causes code duplication, and it's easy to forget to replicate a setting, which leads to divergent behavior.
Describe the solution you'd like It would be nice if I could write something like this and have tus-js-client work through Axios:
That way, all Axios settings would automatically be applied.
Describe alternatives you've considered I'm aware that I could just implement this
AxiosHttpStack
on my side. However, Axios is a popular library, so I think many users could find this useful if it was included in tus-js-client.Can you provide help with implementing this feature? In principle, yes, although I don't know when I'll be able to get around to it.
Additional context N/A