deepl-client icon indicating copy to clipboard operation
deepl-client copied to clipboard

Add support for passing `node-fetch` options

Open wintercounter opened this issue 4 years ago • 3 comments

The Deepl API after 10-15 translations hangs me for a while, sometimes even 5 minutes... I'd like to use AbortController and implement a retry/timeout feature for myself. (Or it could be part of the client as well).

wintercounter avatar Oct 15 '21 12:10 wintercounter

Understandable. I've got a busy weekend, so I can try and implement it next week. If you've got the time, PR's are always welcome :)

gillescoolen avatar Oct 15 '21 13:10 gillescoolen

Which solution ur interested in? Only passing options or implementing timeout/retry? Anyway, for myself I think I won't use it, because it'll still count my character limit even for the "failed" requests.

wintercounter avatar Oct 15 '21 17:10 wintercounter

I think passing the options would be the better solution, as implementing a timeout or retry system might not be an option for everyone using the library.

gillescoolen avatar Oct 16 '21 09:10 gillescoolen