The Wayback Machine - https://web.archive.org/web/20210112002708/https://github.com/cpp-netlib/cpp-netlib/pull/837
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

RFC: Pull out status_t to the top level to allow using those enum values from clients. #837

Open
wants to merge 1 commit into
base: master
from

Conversation

@igorpeshansky
Copy link

@igorpeshansky igorpeshansky commented May 1, 2018

@deanberris PTAL. Would like to gauge if this change is actually a good idea.

Copy link
Member

@deanberris deanberris left a 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 {

This comment has been minimized.

@deanberris

deanberris May 1, 2018
Member

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

This comment has been minimized.

@deanberris

deanberris May 1, 2018
Member

Consider naming this file status_code.hpp along with the suggested change to the enum name.

@anonimal
Copy link

@anonimal anonimal commented May 1, 2018

@igorpeshansky can you also PR this to branch 0.13-release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.