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()

Initializes a new instance of the HttpRequestException class.

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

Applies to

HttpRequestException(String)

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)

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>)

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