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

feat: allow the type of app.request #1444

Merged
merged 2 commits into from
Sep 12, 2023
Merged

Conversation

hagishi
Copy link
Contributor

@hagishi hagishi commented Sep 12, 2023

Author should do the followings, if applicable

  • Add tests
  • Run tests
  • yarn denoify to generate files for Deno

Changes:

  • Defined HonoRequest using type Hono.prototype['request'].
  • Updated ClientRequestOptions to optionally accept either the native fetch method or the HonoRequest method.

What this PR do?

By specifying app.request as a custom fetch, users can now write tests through app.request more efficiently while still adhering to type safety.

@hagishi hagishi changed the title Feature/testing hc feat: allow the type of app.request Sep 12, 2023
@yusukebe
Copy link
Member

Hi @hagishi !

Thanks. Looks good! Ship it.

@yusukebe yusukebe merged commit 00af2a5 into honojs:main Sep 12, 2023
julianpoma pushed a commit to julianpoma/hono that referenced this pull request Sep 16, 2023
* feat: allow the type of app.request

* typo
@hagishi hagishi deleted the feature/testing-hc branch September 18, 2023 00:51
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