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

fixes #175 by allowing full options inclusion in status and fixing types in createResponse #176

Merged
merged 3 commits into from
Jun 21, 2023

Conversation

kwhitley
Copy link
Owner

@kwhitley kwhitley commented Jun 20, 2023

Description

  1. New signature for status takes full ResponseInit options as second param:

    status = (status: number, options?: ResponseInit): Response
  2. Changed ResponseFormatter internal type for createResponse to be more helpful in downstream uses (e.g. json)

    interface ResponseFormatter {
      (body?: any, options?: ResponseInit): Response
    }

Issue Related

See #175

TODO

  • add documentation to itty.dev

@kwhitley kwhitley added BUG Something isn't working in progress I'm working on it... allegedly... labels Jun 20, 2023
@kwhitley kwhitley merged commit 0a8feab into v4.x Jun 21, 2023
3 checks passed
@kwhitley kwhitley deleted the 175-status-and-response branch March 24, 2024 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG Something isn't working in progress I'm working on it... allegedly...
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant