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(http): improve type safety and docs for http_status #2297

Merged
merged 5 commits into from
Jun 3, 2022

Conversation

kitsonk
Copy link
Contributor

@kitsonk kitsonk commented Jun 2, 2022

This is adapting some improvements from https://deno.land/x/oak_commons back into std.

It is a "breaking" change, in that STATUS_TEXT moves from a Map to a Record. Having a POJO is a lot easier to use with the text versus a MAP, and especially with a 1:1 mapping with the enum, having it be a map just adds unnecessary complexity for no benefit.

http/http_status.ts Outdated Show resolved Hide resolved
http/http_status.ts Outdated Show resolved Hide resolved
http/http_status_test.ts Outdated Show resolved Hide resolved
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

None yet

3 participants