Class HTTPResponseHeaders
HTTP Response headers object
Inherited Members
Namespace: Fiddler
Assembly: FiddlerCore.dll
Syntax
public class HTTPResponseHeaders : HTTPHeaders, ICloneable, IEnumerable<HTTPHeaderItem>, IEnumerable
Constructors
HTTPResponseHeaders()
Constructor for HTTP Response headers object
Declaration
public HTTPResponseHeaders()
HTTPResponseHeaders(Int32, String, String[])
Declaration
public HTTPResponseHeaders(int iStatusCode, string sStatusText, string[] sHeaders)
Parameters
System.Int32
iStatusCode
|
System.String
sStatusText
|
System.String[]
sHeaders
|
HTTPResponseHeaders(Int32, String[])
Declaration
public HTTPResponseHeaders(int iStatus, string[] sHeaders)
Parameters
System.Int32
iStatus
|
System.String[]
sHeaders
|
HTTPResponseHeaders(Encoding)
Constructor for HTTP Response headers object
Declaration
public HTTPResponseHeaders(Encoding encodingForHeaders)
Parameters
System.Text.Encoding
encodingForHeaders
Text encoding to be used for this set of Headers when converting to a byte array |
Fields
HTTPResponseCode
Status code from HTTP Response. If setting, also set HTTPResponseStatus too!
Declaration
[CodeDescription("Status code from HTTP Response. Call SetStatus() instead of manipulating directly.")]
public int HTTPResponseCode
Field Value
System.Int32
|
HTTPResponseStatus
Code AND Description of Response Status (e.g. '200 OK').
Declaration
[CodeDescription("Status text from HTTP Response (e.g. '200 OK'). Call SetStatus() instead of manipulating directly.")]
public string HTTPResponseStatus
Field Value
System.String
|
Properties
StatusDescription
Gets or sets the text associated with the response code (e.g. "OK", "Not Found", etc)
Declaration
public string StatusDescription { get; set; }
Property Value
System.String
|
Methods
AssignFromString(String)
Parses a string and assigns the headers parsed to this object
Declaration
[CodeDescription("Replaces the current Response header set using a string representing the new HTTP headers.")]
public override bool AssignFromString(string sHeaders)
Parameters
System.String
sHeaders
The header string |
Returns
System.Boolean
TRUE if the operation succeeded, false otherwise |
Overrides
ByteCount()
Clone()
Clone this HTTPResponseHeaders object and return the result cast to an Object
Declaration
public object Clone()
Returns
System.Object
The new response headers object, cast to an object |
GetEnumerator()
Protect your enumeration using GetReaderLock
Declaration
public IEnumerator<HTTPHeaderItem> GetEnumerator()
Returns
System.Collections.Generic.IEnumerator<HTTPHeaderItem>
|
SetStatus(Int32, String)
Update the response status code and text
Declaration
public void SetStatus(int iCode, string sDescription)
Parameters
System.Int32
iCode
HTTP Status code (e.g. 401) |
System.String
sDescription
HTTP Status text (e.g. "Access Denied") |
ToByteArray(Boolean, Boolean)
Returns a byte array representing the HTTP headers.
Declaration
[CodeDescription("Returns a byte[] representing the HTTP headers.")]
public byte[] ToByteArray(bool prependStatusLine, bool appendEmptyLine)
Parameters
System.Boolean
prependStatusLine
TRUE if the response status line should be included |
System.Boolean
appendEmptyLine
TRUE if there should be a trailing \r\n byte sequence included |
Returns
System.Byte[]
Byte[] containing the headers |
ToString()
Returns a string containing the http headers
Declaration
[CodeDescription("Returns a string containing the HTTP Response headers.")]
public override string ToString()
Returns
System.String
Returns a string containing http headers with a status line but no trailing CRLF |
Overrides
ToString(Boolean, Boolean)
Returns a string containing http headers
Declaration
[CodeDescription("Returns a string representing the HTTP headers.")]
public string ToString(bool prependStatusLine, bool appendEmptyLine)
Parameters
System.Boolean
prependStatusLine
TRUE if the response status line should be included |
System.Boolean
appendEmptyLine
TRUE if there should be a trailing CRLF included |
Returns
System.String
String containing http headers |