js-algorand-sdk icon indicating copy to clipboard operation
js-algorand-sdk copied to clipboard

Add ability to pass in fetch options for urlTokenBaseHTTPClient requests

Open PhearZero opened this issue 1 year ago • 1 comments

Problem

There is no way to abort the execution of a fetch request mid-flight. There is limited access to the fetch options and it is currently not possible to set the signal key to an AbortSignal from an AbortController.

  • https://developer.mozilla.org/en-US/docs/Web/API/AbortController

Solution

Allow for all additional options to be passed to the fetch client. This will also solve any future use cases that rely on access to the fetch options.

client.getSomeRequest().do( headers, {signal} )

Urgency

Very low

PhearZero avatar Feb 23 '24 00:02 PhearZero

Good suggestion. I'll add this to the issues to be considered for v3

jasonpaulos avatar Mar 05 '24 15:03 jasonpaulos

Closed by #883

jasonpaulos avatar Aug 16 '24 16:08 jasonpaulos