Tiny.RestClient v1.7.1 Release Notes

Release Date: 2020-05-29 // 9 months 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();