This content is part of a third party extension that is not supported by the Cake project.
For more information about this extension see Cake.Http.
Summary
Sets the EnsureSuccessStatusCode to true. This makes the httpclient throw an error if it does not return a 200 range status.
- Assembly
- Cake
.Http .dll - Namespace
- Cake
.Http - Containing Type
- Http
Settings Extensions
Syntax
public static HttpSettings EnsureSuccessStatusCode(this HttpSettings settings, bool throwExceptionOnNonSuccessStatusCode = true)
Parameters
Name | Type | Description |
---|---|---|
settings | HttpSettings | The settings. |
throwExceptionOnNonSuccessStatusCode | bool | Determines if an exception is thrown on non-success code. |
Return Value
Type | Description |
---|---|
HttpSettings | The same HttpSettings instance so that multiple calls can be chained. |