Edit

Share via


HttpRequestException Constructors

Definition

Initializes a new instance of the HttpRequestException class.

Overloads

HttpRequestException()

Initializes a new instance of the HttpRequestException class.

HttpRequestException(String)

Initializes a new instance of the HttpRequestException class with a specific message that describes the current exception.

HttpRequestException(String, Exception)

Initializes a new instance of the HttpRequestException class with a specific message that describes the current exception and an inner exception.

HttpRequestException(String, Exception, Nullable<HttpStatusCode>)

Initializes a new instance of the HttpRequestException class with a specific message that describes the current exception, an inner exception, and an HTTP status code.

HttpRequestException(HttpRequestError, String, Exception, Nullable<HttpStatusCode>)

Initializes a new instance of the HttpRequestException class with a specific message an inner exception, and an HTTP status code and an HttpRequestError.

HttpRequestException()

Source:
HttpRequestException.cs
Source:
HttpRequestException.cs
Source:
HttpRequestException.cs

Initializes a new instance of the HttpRequestException class.

public:
 HttpRequestException();
public HttpRequestException ();
Public Sub New ()

Applies to

HttpRequestException(String)

Source:
HttpRequestException.cs
Source:
HttpRequestException.cs
Source:
HttpRequestException.cs

Initializes a new instance of the HttpRequestException class with a specific message that describes the current exception.

public:
 HttpRequestException(System::String ^ message);
public HttpRequestException (string message);
public HttpRequestException (string? message);
new System.Net.Http.HttpRequestException : string -> System.Net.Http.HttpRequestException
Public Sub New (message As String)

Parameters

message
String

A message that describes the current exception.

Applies to

HttpRequestException(String, Exception)

Source:
HttpRequestException.cs
Source:
HttpRequestException.cs
Source:
HttpRequestException.cs

Initializes a new instance of the HttpRequestException class with a specific message that describes the current exception and an inner exception.

public:
 HttpRequestException(System::String ^ message, Exception ^ inner);
public HttpRequestException (string message, Exception inner);
public HttpRequestException (string? message, Exception? inner);
new System.Net.Http.HttpRequestException : string * Exception -> System.Net.Http.HttpRequestException
Public Sub New (message As String, inner As Exception)

Parameters

message
String

A message that describes the current exception.

inner
Exception

The inner exception.

Applies to

HttpRequestException(String, Exception, Nullable<HttpStatusCode>)

Source:
HttpRequestException.cs
Source:
HttpRequestException.cs
Source:
HttpRequestException.cs

Initializes a new instance of the HttpRequestException class with a specific message that describes the current exception, an inner exception, and an HTTP status code.

public:
 HttpRequestException(System::String ^ message, Exception ^ inner, Nullable<System::Net::HttpStatusCode> statusCode);
public HttpRequestException (string? message, Exception? inner, System.Net.HttpStatusCode? statusCode);
new System.Net.Http.HttpRequestException : string * Exception * Nullable<System.Net.HttpStatusCode> -> System.Net.Http.HttpRequestException
Public Sub New (message As String, inner As Exception, statusCode As Nullable(Of HttpStatusCode))

Parameters

message
String

A message that describes the current exception.

inner
Exception

The inner exception.

statusCode
Nullable<HttpStatusCode>

The HTTP status code.

Applies to

HttpRequestException(HttpRequestError, String, Exception, Nullable<HttpStatusCode>)

Source:
HttpRequestException.cs
Source:
HttpRequestException.cs

Initializes a new instance of the HttpRequestException class with a specific message an inner exception, and an HTTP status code and an HttpRequestError.

public HttpRequestException (System.Net.Http.HttpRequestError httpRequestError, string? message = default, Exception? inner = default, System.Net.HttpStatusCode? statusCode = default);
new System.Net.Http.HttpRequestException : System.Net.Http.HttpRequestError * string * Exception * Nullable<System.Net.HttpStatusCode> -> System.Net.Http.HttpRequestException
Public Sub New (httpRequestError As HttpRequestError, Optional message As String = Nothing, Optional inner As Exception = Nothing, Optional statusCode As Nullable(Of HttpStatusCode) = Nothing)

Parameters

httpRequestError
HttpRequestError

The HttpRequestError that caused the exception.

message
String

A message that describes the current exception.

inner
Exception

The inner exception.

statusCode
Nullable<HttpStatusCode>

The HTTP status code.

Applies to