HttpRequestMessageExtensions.CreateNotFoundResponse Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| CreateNotFoundResponse(HttpRequestMessage) |
Creates an System.Net.Http.HttpResponseMessage with an System.Net.HttpStatusCode.NotFound status code and a default System.Web.Http.HttpError as HTTP response body. |
| CreateNotFoundResponse(HttpRequestMessage, String, Object[]) |
Creates an System.Net.Http.HttpResponseMessage with an System.Net.HttpStatusCode.NotFound status code and a System.Web.Http.HttpError containing the provided message as HTTP response body. |
CreateNotFoundResponse(HttpRequestMessage)
Creates an System.Net.Http.HttpResponseMessage with an System.Net.HttpStatusCode.NotFound status code and a default System.Web.Http.HttpError as HTTP response body.
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", Justification="Parameters are validated by Create due to how extension methods are resolved.")]
public static System.Net.Http.HttpResponseMessage CreateNotFoundResponse(this System.Net.Http.HttpRequestMessage request);
[<System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", Justification="Parameters are validated by Create due to how extension methods are resolved.")>]
static member CreateNotFoundResponse : System.Net.Http.HttpRequestMessage -> System.Net.Http.HttpResponseMessage
<Extension()>
Public Function CreateNotFoundResponse (request As HttpRequestMessage) As HttpResponseMessage
Parameters
- request
- System.Net.Http.HttpRequestMessage
The current System.Net.Http.HttpRequestMessage.
Returns
An initialized System.Net.Http.HttpResponseMessage.
- Attributes
-
System.Diagnostics.CodeAnalysis.SuppressMessageAttribute
Applies to
CreateNotFoundResponse(HttpRequestMessage, String, Object[])
Creates an System.Net.Http.HttpResponseMessage with an System.Net.HttpStatusCode.NotFound status code and a System.Web.Http.HttpError containing the provided message as HTTP response body.
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", Justification="Parameters are validated by Create due to how extension methods are resolved.")]
public static System.Net.Http.HttpResponseMessage CreateNotFoundResponse(this System.Net.Http.HttpRequestMessage request, string format, params object[] args);
[<System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", Justification="Parameters are validated by Create due to how extension methods are resolved.")>]
static member CreateNotFoundResponse : System.Net.Http.HttpRequestMessage * string * obj[] -> System.Net.Http.HttpResponseMessage
<Extension()>
Public Function CreateNotFoundResponse (request As HttpRequestMessage, format As String, ParamArray args As Object()) As HttpResponseMessage
Parameters
- request
- System.Net.Http.HttpRequestMessage
The current System.Net.Http.HttpRequestMessage.
- format
- System.String
A composite format string.
- args
- System.Object[]
An object array that contains zero or more objects to format.
Returns
An initialized System.Net.Http.HttpResponseMessage.
- Attributes
-
System.Diagnostics.CodeAnalysis.SuppressMessageAttribute