Class HttpWebRequestResponseData
public class HttpWebRequestResponseData : IWebResponseData
- Inheritance
-
HttpWebRequestResponseData
- Implements
- Inherited Members
Constructors
HttpWebRequestResponseData(HttpWebResponse)
public HttpWebRequestResponseData(HttpWebResponse response)
Parameters
response
HttpWebResponse
HttpWebRequestResponseData(SerializationInfo, StreamingContext)
Constructs a new instance of the HttpWebRequestResponseData class with serialized data.
protected HttpWebRequestResponseData(SerializationInfo info, StreamingContext context)
Parameters
info
SerializationInfoThe SerializationInfo that holds the serialized object data.
context
StreamingContextThe StreamingContext that contains contextual information about the source or destination.
Exceptions
- ArgumentNullException
The
info
parameter is null.- SerializationException
The class name is null or HResult is zero (0).
Properties
ContentLength
public long ContentLength { get; }
Property Value
ContentType
public string ContentType { get; }
Property Value
IsSuccessStatusCode
public bool IsSuccessStatusCode { get; }
Property Value
ResponseBody
public IHttpResponseBody ResponseBody { get; }
Property Value
StatusCode
public HttpStatusCode StatusCode { get; }
Property Value
Methods
GetHeaderNames()
public string[] GetHeaderNames()
Returns
- string[]
GetHeaderValue(string)
public string GetHeaderValue(string name)
Parameters
name
string
Returns
GetObjectData(SerializationInfo, StreamingContext)
Sets the SerializationInfo with information about the exception.
[SecurityCritical]
public void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
info
SerializationInfoThe SerializationInfo that holds the serialized object data about the exception being thrown.
context
StreamingContextThe StreamingContext that contains contextual information about the source or destination.
Exceptions
- ArgumentNullException
The
info
parameter is a null reference (Nothing in Visual Basic).
IsHeaderPresent(string)
public bool IsHeaderPresent(string headerName)
Parameters
headerName
string