Class HttpMethodBuilderExtensions
Defines the static methods for an IHttpMethodBuilder provided by the library.
Namespace: ReqRest.Builders
Assembly: ReqRest.dll
Syntax
public static class HttpMethodBuilderExtensions
Methods
Delete<T>(T)
Sets the HttpMethod to the HTTP DELETE
method.
Declaration
public static T Delete<T>(this T builder)
where T : IHttpMethodBuilder
Parameters
Type | Name | Description |
---|---|---|
T | builder | The builder. |
Returns
Type | Description |
---|---|
T | The specified |
Type Parameters
Name | Description |
---|---|
T | The type of the builder. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
Get<T>(T)
Sets the HttpMethod to the HTTP GET
method.
Declaration
public static T Get<T>(this T builder)
where T : IHttpMethodBuilder
Parameters
Type | Name | Description |
---|---|---|
T | builder | The builder. |
Returns
Type | Description |
---|---|
T | The specified |
Type Parameters
Name | Description |
---|---|
T | The type of the builder. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
Head<T>(T)
Sets the HttpMethod to the HTTP HEAD
method.
Declaration
public static T Head<T>(this T builder)
where T : IHttpMethodBuilder
Parameters
Type | Name | Description |
---|---|---|
T | builder | The builder. |
Returns
Type | Description |
---|---|
T | The specified |
Type Parameters
Name | Description |
---|---|
T | The type of the builder. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
Options<T>(T)
Sets the HttpMethod to the HTTP OPTIONS
method.
Declaration
public static T Options<T>(this T builder)
where T : IHttpMethodBuilder
Parameters
Type | Name | Description |
---|---|---|
T | builder | The builder. |
Returns
Type | Description |
---|---|
T | The specified |
Type Parameters
Name | Description |
---|---|
T | The type of the builder. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
Patch<T>(T)
Sets the HttpMethod to the HTTP PATCH
method.
Declaration
public static T Patch<T>(this T builder)
where T : IHttpMethodBuilder
Parameters
Type | Name | Description |
---|---|---|
T | builder | The builder. |
Returns
Type | Description |
---|---|
T | The specified |
Type Parameters
Name | Description |
---|---|
T | The type of the builder. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
Post<T>(T)
Sets the HttpMethod to the HTTP POST
method.
Declaration
public static T Post<T>(this T builder)
where T : IHttpMethodBuilder
Parameters
Type | Name | Description |
---|---|---|
T | builder | The builder. |
Returns
Type | Description |
---|---|
T | The specified |
Type Parameters
Name | Description |
---|---|
T | The type of the builder. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
Put<T>(T)
Sets the HttpMethod to the HTTP PUT
method.
Declaration
public static T Put<T>(this T builder)
where T : IHttpMethodBuilder
Parameters
Type | Name | Description |
---|---|---|
T | builder | The builder. |
Returns
Type | Description |
---|---|
T | The specified |
Type Parameters
Name | Description |
---|---|
T | The type of the builder. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
SetMethod<T>(T, HttpMethod)
Sets the HttpMethod which is being built.
Declaration
public static T SetMethod<T>(this T builder, HttpMethod method)
where T : IHttpMethodBuilder
Parameters
Type | Name | Description |
---|---|---|
T | builder | The builder. |
HttpMethod | method | The HTTP method used by the HTTP request message. |
Returns
Type | Description |
---|---|
T | The specified |
Type Parameters
Name | Description |
---|---|
T | The type of the builder. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
SetMethod<T>(T, String)
Sets the HttpMethod which is being built.
Declaration
public static T SetMethod<T>(this T builder, string method)
where T : IHttpMethodBuilder
Parameters
Type | Name | Description |
---|---|---|
T | builder | The builder. |
String | method | A string from which an HttpMethod can be created. |
Returns
Type | Description |
---|---|
T | The specified |
Type Parameters
Name | Description |
---|---|
T | The type of the builder. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
Trace<T>(T)
Sets the HttpMethod to the HTTP TRACE
method.
Declaration
public static T Trace<T>(this T builder)
where T : IHttpMethodBuilder
Parameters
Type | Name | Description |
---|---|---|
T | builder | The builder. |
Returns
Type | Description |
---|---|
T | The specified |
Type Parameters
Name | Description |
---|---|
T | The type of the builder. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|