What to do when the HttpStatusCode
class does not exist the 207 , 208 and 226
Someone already asked the question in GitHub: link , it seems to me that they did not do an "update". Here is the code:
HttpResponseMessage response = await httpClient.PostAsync();
if ((int)response.StatusCode < 200 || (int)response.StatusCode > 226 && (int)response.StatusCode != 404) //[200,208] = HTTP OK
{
//HTTP Response Not OK
}
In the above code you can only enter if
when different from the list below.
Here is the "Success" family list:
200 201 202 203 204 205 206 207 208 226
Source list: link