Skip to content

Added http status codes#325

Merged
tstack merged 3 commits intolibcpr:masterfrom
diogo464:master
Sep 18, 2019
Merged

Added http status codes#325
tstack merged 3 commits intolibcpr:masterfrom
diogo464:master

Conversation

@diogo464
Copy link
Contributor

I didn't find status codes in the library so I scrapped them from https://developer.mozilla.org/en-US/docs/Web/HTTP/Status

Copy link
Contributor

@tstack tstack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might also be helpful to have some functions to cover the general classes of errors, like is_client_error() for the 4XX range and is_server_error() for the 5XX range.

@tstack tstack merged commit 77b5bdc into libcpr:master Sep 18, 2019
@tstack
Copy link
Contributor

tstack commented Sep 18, 2019

thanks!

@mtangoo
Copy link

mtangoo commented Sep 18, 2019

Great addition. I have found that status reason important especially to the user. There is this code[1] here under CC0. Should we add it to library so that when we get status code we can request reason to display to user for example?

[1] https://github.com/j-ulrich/http-status-codes-cpp

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

Successfully merging this pull request may close these issues.

3 participants