Swap all those timeoutPromise-s with the standard way of doing timeouts leveraging AbortSignal#timeout.
Refactor fetchers to use AbortSignal#timeout #73
vladimyr/doipjs:refactor-fetchers into dev
a6c98ad664
c241ae7160
c241ae7160
85db8b5792
85db8b5792
b6ad65ba24
b6ad65ba24
15e3d2dff3
This PR is amazing, I did not know about AbortSignal and feel silly for not knowing.
Also, more red than green!
Have you tried the fetchers? From what I can tell, everything is still in there — that is one neat trick with the arraybuffer responseType, wasn't aware one could solve it like this.
I ran examples but that may not be sufficient so I decided to write some proper tests! I'm currently reading about using MSW for mocking Axios requests. The idea is to make all fetchers echo back request configuration data just like https://httpbin.org does and make sure correct URLs, headers, and payloads are being used.
@ -115,0 +103,4 @@
}
/**
* Create Telegram API reqest
Typo (missing u in request)
I've only heard about AbortController before, but good to see an implementation using it. I have something to steal from now 👼
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Archived
Archived
No due date set.
No dependencies set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?