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

Add typed fetchApi trick #3

Open
karlhorky opened this issue Jun 10, 2023 · 0 comments
Open

Add typed fetchApi trick #3

karlhorky opened this issue Jun 10, 2023 · 0 comments

Comments

@karlhorky
Copy link
Owner

Like a miniature, manual version of tRPC, which allows for:

  • similar API to fetch (with some slight simplifications)
  • checking validity of methods + API route strings (eg. GET /api/animals)
  • typechecking request bodies
  • typed responses (responseBody.errors | responseBody.<entity>)
  • potentially: usage of FormData for larger requests such as file upload
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

No branches or pull requests

1 participant