Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discussion: use Undici #379

Open
sebastien-comeau opened this issue Oct 2, 2024 · 2 comments
Open

Discussion: use Undici #379

sebastien-comeau opened this issue Oct 2, 2024 · 2 comments

Comments

@sebastien-comeau
Copy link

sebastien-comeau commented Oct 2, 2024

Environment

Node version: v18 and newer
typed-rest-client version: Latest

Issue Description

I'm eager to leverage typed-rest-client within my Remix application. However, I believe its current reliance on http and https limits its potential for certain advanced features.

Specifically, I'm interested in incorporating:

These features can be more effectively managed with undici.

I'm considering forking the repository to implement this transition. I'd appreciate your insights on the feasibility and potential implications of such a change.

@sebastien-comeau
Copy link
Author

Anyone?

@KonstantinTyukalov
Copy link
Contributor

Hi @sebastien-comeau, thanks for the reporting! We are working on higher priority issues now, but we'll get back to this one once we'll have capacity.

Note that this client is currently supporting node 16, so to add the undici features we'll need to drop the node 16 support.

Regarding retries, we currently have simple built-in retry logic:

// Allows retries only on Read operations (since writes may not be idempotent)
allowRetries?: boolean;
maxRetries?: number;

Also note that the main goal of the typed-rest-client package is to provide RESTful request-response wrappers, so it wasn't designed for 'fire-and-forget' (am I right that this is something undici's Dispatcher do?) use cases initially

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants