Skip to content

feat: enhance ConfigOptions to include init parameter for fetch requests - #1061

Closed
Magi1053 wants to merge 1 commit into
readmeio:v6from
Magi1053:v6
Closed

feat: enhance ConfigOptions to include init parameter for fetch requests#1061
Magi1053 wants to merge 1 commit into
readmeio:v6from
Magi1053:v6

Conversation

@Magi1053

Copy link
Copy Markdown
🚥 Resolves #1046

🧰 Changes

This PR adds support for passing custom init options to the fetch request in the API core.

  • The ConfigOptions interface now includes an optional init property, allowing users to specify additional RequestInit options.
  • The APICore class now merges config.init into the fetch request's init object, ensuring user-supplied options are respected (except for signal, which is managed internally).

🧬 QA & Testing

  1. Set up an instance of APICore and pass custom init options (e.g., custom headers or credentials) via setConfig({ init: { ... } }).
  2. Make a request using fetch or fetchOperation.
  3. Verify that the custom init options are present in the outgoing request (except for signal).
  4. Ensure that the request still respects the internal timeout and abort logic.
  5. Run the existing test suite to confirm no regressions.

@erunion

erunion commented Jul 23, 2026

Copy link
Copy Markdown
Member

closing in favor of #1183, thank you!

@erunion erunion closed this Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants