question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[FEATURE] Support HTTPStatus

See original GitHub issue

Is your feature request related to a problem

We typically use HTTPStatus in our code. When used as a value for status_code in path functions this results in the string literal in the documentation and when “trying” the response is shown as undocumented because it doesn’t match the actual response code

The solution you would like

I want to use HTTPStatus enum values and have it work exactly like the starlette.status pseudo enum values

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
hmvpcommented, Jun 15, 2020

Works as expected 👍

2reactions
tiangolocommented, Jun 8, 2020

Cool, thanks!

Yeah, I would accept a PR checking if a status code is an enum to get its value first. 🤓 ✔️

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTTP response status codes - MDN Web Docs - Mozilla
HTTP response status codes indicate whether a specific HTTP request has been successfully completed. Responses are grouped in five classes:
Read more >
A Complete Guide and List of HTTP Status Codes
A complete list of HTTP status codes with explaination of what they are, why they occur and what you can do to fix...
Read more >
Status codes in HTTP - W3C
These codes indicate success. The body section if present is the object returned by the request. It is a MIME format object. It...
Read more >
HTTP Status Codes - REST API Tutorial
HTTP status codes and how to use them in RESTful API or Web Services. ... More REST service-specific information is contained in the...
Read more >
List of HTTP status codes - Wikipedia
4xx client error – the request contains bad syntax or cannot be fulfilled; 5xx server error – the server failed to fulfil an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found