HttpClientRequestSettings.ThrowExceptions

By default (false) throws a Web Exception on 500 and 400 repsonses. This is the default WebClient behavior.

If true doesn't throw, but instead returns the HTTP response. Useful if you need to return error messages on 500 and 400 responses from API requests.

public bool ThrowExceptions { get; set; }

See also:

Class HttpClientRequestSettings

© West Wind Technologies, 1996-2024 • Updated: 06/29/24
Comment or report problem with topic