RFC: Pull out status_t to the top level to allow using those enum values from clients.#837
Open
igorpeshansky wants to merge 1 commit intocpp-netlib:mainfrom
Open
Conversation
deanberris
requested changes
May 1, 2018
Member
deanberris
left a comment
There was a problem hiding this comment.
Thanks @igorpeshansky -- I love this idea. We might even be able to consolidate this with the server-side defined status codes as well. Feedback follows.
| namespace http { | ||
|
|
||
| /// The set of known status codes for HTTP server responses. | ||
| enum status_t { |
Member
There was a problem hiding this comment.
If we're doing this, then I suggest dropping the _t suffix, and calling it status_code to be more descriptive.
Also, if we're going to do this as well, we might as well add the following:
- An "unknown" value to be the default (say,
0). - More known status codes, even those that are extensions -- we can probably do those later on, instead of in this PR.
| @@ -0,0 +1,39 @@ | |||
| #ifndef BOOST_NETWORK_PROTOCOL_HTTP_STATUS_HPP_20180501 | |||
| #define BOOST_NETWORK_PROTOCOL_HTTP_STATUS_HPP_20180501 | |||
Member
There was a problem hiding this comment.
Consider naming this file status_code.hpp along with the suggested change to the enum name.
|
@igorpeshansky can you also PR this to branch 0.13-release? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@deanberris PTAL. Would like to gauge if this change is actually a good idea.