readmeio / readmeio/api

Allow passing options to fetch

Open
#1,046 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
697
Forks
31
Avg merge
3d 21h
Merged PRs (30d)
10

Description

Looks like this should be simple to implement and absolutely required for my use case, as I need to be able to pass an agent property to the fetch options but it seems like this is not currently allowed. Looking at the code all I need is to be able to add custom values to the init (type RequestInit) property (possibly through a core.config entry) and it should pass through.

https://github.com/readmeio/api/blob/685212b1f6c4b573b0b4affd0c6f0c2b243f0bea/packages/core/src/index.ts#L100-L110

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at packages/core/src/index.ts around lines 100-110, where the fetch options and RequestInit property are handled. Trace how core configuration reaches fetch and determine how custom RequestInit values such as agent should pass through. Done means callers can provide these options without them being rejected or dropped.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.