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

Replace enums HttpMethod and HttpStatus with String/int or provide access to "raw" values #168

Open
thc202 opened this issue Oct 10, 2024 · 0 comments

Comments

@thc202
Copy link

thc202 commented Oct 10, 2024

By spec an HTTP method can be anything (within the token format), use of enum for the method leads to failure to read requests that use a method that's not currently supported by the library (e.g. #13).
Similarly to the status codes (e.g. #20). For correctness, it's possible to read HAR with status code not supported by the library but it ends up with 0 status code (the UNKNOWN_HTTP_STATUS).

https://httpwg.org/specs/rfc9110.html#rfc.section.9.1
https://httpwg.org/specs/rfc9110.html#status.codes

For registered methods: https://www.iana.org/assignments/http-methods/http-methods.xhtml
For registered status codes: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
(As example of methods/status codes that are officially registered but not supported by the library.)

Happy to pull request a solution.

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