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

No way to get the status message #77

Open
bibhas2 opened this issue Mar 1, 2016 · 4 comments
Open

No way to get the status message #77

bibhas2 opened this issue Mar 1, 2016 · 4 comments

Comments

@bibhas2
Copy link

bibhas2 commented Mar 1, 2016

I am using hoxy as a reverse proxy. I find no way to get the status message from the response. Example "INTERNAL SERVER ERROR".

HTTP/1.1 500 INTERNAL SERVER ERROR
@greim
Copy link
Owner

greim commented Mar 1, 2016

You can get a status message using node's built in http.STATUS_CODES. https://nodejs.org/dist/latest-v4.x/docs/api/http.html#http_http_status_codes

@greim greim closed this as completed Mar 1, 2016
@bibhas2
Copy link
Author

bibhas2 commented Mar 1, 2016

I need the exact status message returned by the server not some kind of translation of the status code to a text message. For example the following returns the message in all uppercase NOT FOUND.

http://httpbin.org/status/404

If that is not possible then I will do what you have suggested.

@ZzZombo
Copy link

ZzZombo commented Apr 1, 2017

I'd like to reopen this. There is an upstream proxy that indicates some meaningful things by appending its name to the status message if it performs an action on the response.

@greim
Copy link
Owner

greim commented Apr 4, 2017

I'd accept a PR for this.

Relevant API: https://nodejs.org/api/http.html#http_message_statusmessage

@greim greim reopened this Apr 4, 2017
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

3 participants