HttpRequestException Class

A base class for exceptions thrown by the HttpClient and HttpMessageHandler classes.

Inheritance Hierarchy

System.Object
  System.Exception
    System.Net.Http.HttpRequestException

Namespace:  System.Net.Http
Assembly:  System.Net.Http (in System.Net.Http.dll)

Syntax

'Declaration
<SerializableAttribute> _
Public Class HttpRequestException _
    Inherits Exception
'Usage
Dim instance As HttpRequestException
[SerializableAttribute]
public class HttpRequestException : Exception
[SerializableAttribute]
public ref class HttpRequestException : public Exception
[<SerializableAttribute>]
type HttpRequestException =  
    class 
        inherit Exception 
    end
public class HttpRequestException extends Exception

The HttpRequestException type exposes the following members.

Constructors

  Name Description
Public method HttpRequestException() Initializes a new instance of the HttpRequestException class.
Public method HttpRequestException(String) Initializes a new instance of the HttpRequestException class with a specific message that describes the current exception.
Public method HttpRequestException(String, Exception) Initializes a new instance of the HttpRequestException class with a specific message that describes the current exception and an inner exception.

Top

Properties

  Name Description
Public property Data (Inherited from Exception.)
Public property HelpLink (Inherited from Exception.)
Public property HResult (Inherited from Exception.)
Public property InnerException (Inherited from Exception.)
Public property Message (Inherited from Exception.)
Public property Source (Inherited from Exception.)
Public property StackTrace (Inherited from Exception.)
Public property TargetSite (Inherited from Exception.)

Top

Methods

  Name Description
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetBaseException (Inherited from Exception.)
Public method GetHashCode (Inherited from Object.)
Public method GetObjectData Security Critical. (Inherited from Exception.)
Public method GetType (Inherited from Exception.)
Protected method MemberwiseClone (Inherited from Object.)
Public method ToString (Inherited from Exception.)

Top

Events

  Name Description
Protected event SerializeObjectState (Inherited from Exception.)

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

System.Net.Http Namespace