@@ -46,12 +46,12 @@ Might also be working with Qt 4 versions but this has not been tested.
4646#include " HttpStatusCodes_C++.h"
4747#include < iostream>
4848
49- void printReplyStatus (MyHttpReplyClass reply)
49+ void printReplyStatus ( MyHttpReplyClass reply )
5050{
51- if (reply.status == HttpStatus::OK)
51+ if ( reply.status == HttpStatus::OK )
5252 std::cout << "Success!";
5353 else
54- std::cerr << reply.status << " " << HttpStatus::reasonPhrase(reply.status);
54+ std::cerr << reply.status << " " << HttpStatus::reasonPhrase( reply.status );
5555}
5656```
5757
@@ -107,17 +107,17 @@ enum Code
107107
108108##### C Variant #####
109109``` c
110- char HttpStatus_isInformational (int code);
111- char HttpStatus_isSuccessful(int code);
112- char HttpStatus_isRedirection(int code);
113- char HttpStatus_isClientError(int code);
114- char HttpStatus_isServerError(int code);
110+ char HttpStatus_isInformational ( int code );
111+ char HttpStatus_isSuccessful( int code );
112+ char HttpStatus_isRedirection( int code );
113+ char HttpStatus_isClientError( int code );
114+ char HttpStatus_isServerError( int code );
115115```
116116Return `1` if the given _code_ belongs to the corresponding class of status codes (see [RFC7231](https://tools.ietf.org/html/rfc7231#section-6)).
117117Return `0` otherwise.
118118
119119```c
120- char HttpStatus_isError(int code);
120+ char HttpStatus_isError( int code);
121121```
122122Returns ` 1 ` if the given _ code_ is either a client error, a server error or any non-standard error code.
123123Non-standard error codes are status codes with a value of 600 or higher.
@@ -127,19 +127,19 @@ Returns `0` otherwise.
127127> ** Note:** The C++11 variant also provides overloads for ` HttpStatus::Code ` . So there is no need to cast.
128128
129129``` c++
130- bool HttpStatus::isInformational (int code);
131- bool HttpStatus::isSuccessful(int code);
132- bool HttpStatus::isRedirection(int code);
133- bool HttpStatus::isClientError(int code);
134- bool HttpStatus::isServerError(int code);
130+ bool HttpStatus::isInformational ( int code );
131+ bool HttpStatus::isSuccessful( int code );
132+ bool HttpStatus::isRedirection( int code );
133+ bool HttpStatus::isClientError( int code );
134+ bool HttpStatus::isServerError( int code );
135135```
136136Return `true` if the given _code_ belongs to the corresponding class of status codes (see [RFC7231](https://tools.ietf.org/html/rfc7231#section-6)).
137137Return `false` otherwise.
138138
139139
140140
141141```c++
142- bool HttpStatus::isError(int code);
142+ bool HttpStatus::isError( int code );
143143```
144144Returns ` true ` if the given _ code_ is either a client error, a server error or any non-standard error code.
145145Non-standard error codes are status codes with a value of 600 or higher.
@@ -150,20 +150,20 @@ Returns `false` otherwise.
150150
151151##### C Variant #####
152152``` c
153- const char * HttpStatus_reasonPhrase (int code);
153+ const char * HttpStatus_reasonPhrase ( int code );
154154```
155155Returns the HTTP reason phrase string corresponding to the given _code_.
156156
157157##### C++/C++11 Variants #####
158158> **Note:** The C++11 variant also provides an overload for `HttpStatus::Code`. So there is no need to cast.
159159```c++
160- std::string HttpStatus::reasonPhrase(int code);
160+ std::string HttpStatus::reasonPhrase( int code );
161161```
162162Returns the HTTP reason phrase string corresponding to the given _ code_ .
163163
164164##### Qt Variant #####
165165``` c++
166- QString HttpStatus::reasonPhrase (int code);
166+ QString HttpStatus::reasonPhrase ( int code );
167167```
168168Returns the HTTP reason phrase string corresponding to the given _code_.
169169
@@ -172,20 +172,20 @@ Returns the HTTP reason phrase string corresponding to the given _code_.
172172
173173##### C++11 Variant #####
174174```c++
175- int HttpStatus::toInt(HttpStatus::Code code);
175+ int HttpStatus::toInt( HttpStatus::Code code );
176176```
177177Returns the integer value corresponding to a given a _ code_ .
178178This is a convenience function as replacement for a ` static_cast<int>() ` .
179179
180180##### Qt Variant #####
181181``` c++
182- int HttpStatus::networkErrorToStatusCode (QNetworkReply::NetworkError error);
182+ int HttpStatus::networkErrorToStatusCode ( QNetworkReply::NetworkError error );
183183```
184184Returns the HTTP status code corresponding to the given _error_ if there is one.
185185Otherwise, `-1` is returned.
186186
187187```c++
188- QNetworkReply::NetworkError HttpStatus::statusCodeToNetworkError(int code);
188+ QNetworkReply::NetworkError HttpStatus::statusCodeToNetworkError( int code );
189189```
190190Returns the ` QNetworkReply::NetworkError ` corresponding to the given _ code_ if there is one.
191191For codes where there is no exact match, the best matching "catch all" code (` QNetworkReply::NoError ` ,
0 commit comments