Class HttpStatusCodeBuilderExtensions
Defines the static methods for an IHttpStatusCodeBuilder provided by the library.
Namespace: ReqRest.Builders
Assembly: ReqRest.dll
Syntax
public static class HttpStatusCodeBuilderExtensions
Methods
SetStatusCode<T>(T, Int32)
Sets the HTTP status code which is being built.
Declaration
public static T SetStatusCode<T>(this T builder, int statusCode)
where T : IHttpStatusCodeBuilder
Parameters
Type | Name | Description |
---|---|---|
T | builder | The builder. |
Int32 | statusCode | The HTTP status code. |
Returns
Type | Description |
---|---|
T | The specified |
Type Parameters
Name | Description |
---|---|
T | The type of the builder. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
SetStatusCode<T>(T, HttpStatusCode)
Sets the HTTP status code which is being built.
Declaration
public static T SetStatusCode<T>(this T builder, HttpStatusCode statusCode)
where T : IHttpStatusCodeBuilder
Parameters
Type | Name | Description |
---|---|---|
T | builder | The builder. |
HttpStatusCode | statusCode | The HTTP status code. |
Returns
Type | Description |
---|---|
T | The specified |
Type Parameters
Name | Description |
---|---|
T | The type of the builder. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|