Skip to content

Conversation

@Rubberbandits
Copy link
Contributor

Returning different status codes is an important part of any kind of REST API implementation, and web development in general. This is a simple addition with just a few lines, as HTTPLib will set the status code if it hasn't been changed from -1 to either OK_200 or PartialContent_206.

It also makes sure that the status code given is valid between 100 and 599.

@RaphaelIT7 RaphaelIT7 merged commit c679a23 into RaphaelIT7:main Jul 22, 2025
56 checks passed
RaphaelIT7 pushed a commit that referenced this pull request Jul 22, 2025
* Update httpserver.cpp
* Fix typo in Util::AddFunc call for HttpResponse:SetStatusCode
@RaphaelIT7 RaphaelIT7 added the enhancement New feature or request label Jul 25, 2025
@RaphaelIT7 RaphaelIT7 added this to the Release 0.8 milestone Jul 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants