Tiny.RestClient v1.7.1 Release Notes

Release Date: 2020-05-29 // over 1 year ago

Previous changes from v1.7.0

    • ➕ Add possibility for request with content (like POST, PUT ...) to use methods : WithBasicAuthentication WithOAuthBearer WithTimeout WithETagContainer.
    • 👍 Allow non 2xx response (see sample below)

    👍 Allow non http 2xx responses

    Globaly

    👍 Allow any status codes :

    client.Settings.HttpStatusCodeAllowed.AllowAnyStatus = true;
    

    👍 Allow only a range of http status codes :

    client.Settings.HttpStatusCodeAllowed.Add(new HttpStatusRange(400, 420));
    

    or

    client.Settings.HttpStatusCodeAllowed.Add(new HttpStatusRange(System.Net.HttpStatusCode.BadRequest, System.Net.HttpStatusCode.BadGateway));
    

    By request

    👍 Allow all status code :

    request.AllowAllHttpStatusCode().ExecuteAsync();
    

    👍 Allow only a range of http status codes :

    request.AllowRangeHttpStatusCode(400, 420).ExecuteAsync();
    

    👍 Allow only on stats code of http status codes :

    request.AllowSpecificHttpStatusCode(409).ExecuteAsync();