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

update request handling in resolveHttpResponse to follow Fetch API #1853

Closed
sachinraja opened this issue May 1, 2022 · 1 comment · Fixed by #5684
Closed

update request handling in resolveHttpResponse to follow Fetch API #1853

sachinraja opened this issue May 1, 2022 · 1 comment · Fixed by #5684

Comments

@sachinraja
Copy link
Member

sachinraja commented May 1, 2022

follow up for #1852

We should change the input to resolveHTTPResponse to accept Fetch API objects by default. All other handlers should then be updated to map to the Fetch API.

Right now the Fetch adapter has to adapt objects to what tRPC accepts:

const req: HTTPRequest = {
query: url.searchParams,
method: opts.req.method,
headers: Object.fromEntries(opts.req.headers),
body: await opts.req.text(),
};

TRP-66

Funding

  • You can sponsor this specific effort via a Polar.sh pledge below
  • We receive the pledge once the issue is completed & verified
Fund with Polar
@KATT KATT added the linear label May 25, 2023
@KATT KATT changed the title update request handling in resolveHttpResponse to follow Fetch API [TRP-66] update request handling in resolveHttpResponse to follow Fetch API May 25, 2023
@KATT KATT added linear and removed linear labels May 25, 2023
@KATT KATT changed the title [TRP-66] update request handling in resolveHttpResponse to follow Fetch API update request handling in resolveHttpResponse to follow Fetch API May 25, 2023
@KATT KATT removed the Improvement label Aug 24, 2023
@helmturner helmturner linked a pull request Oct 26, 2023 that will close this issue
3 tasks
@helmturner helmturner mentioned this issue Oct 26, 2023
3 tasks
Copy link

github-actions bot commented May 2, 2024

This issue has been locked because we are very unlikely to see comments on closed issues. If you are running into a similar issue, please create a new issue. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.