Class HTTPRequestHeaders
HTTP Request headers object
Inherited Members
Namespace: Fiddler
Assembly: FiddlerCore.dll
Syntax
public class HTTPRequestHeaders : HTTPHeaders, ICloneable, IEnumerable<HTTPHeaderItem>, IEnumerable
Constructors
HTTPRequestHeaders()
Constructor for HTTP Request headers object
Declaration
public HTTPRequestHeaders()
HTTPRequestHeaders(String, String[])
Declaration
public HTTPRequestHeaders(string sPath, string[] sHeaders)
Parameters
System.String
sPath
|
System.String[]
sHeaders
|
HTTPRequestHeaders(Encoding)
Constructor for HTTP Request headers object
Declaration
public HTTPRequestHeaders(Encoding encodingForHeaders)
Parameters
System.Text.Encoding
encodingForHeaders
Text encoding to be used for this set of Headers when converting to a byte array |
Fields
HTTPMethod
The HTTP Method (e.g. GET, POST, etc)
Declaration
[CodeDescription("HTTP Method or Verb from HTTP Request.")]
public string HTTPMethod
Field Value
System.String
|
Properties
RawPath
Get or set the request path as a byte array
Declaration
[CodeDescription("Byte array representing the HTTP Request path.")]
public byte[] RawPath { get; set; }
Property Value
System.Byte[]
|
RequestPath
Get or set the request path as a string
Declaration
[CodeDescription("String representing the HTTP Request path, e.g. '/path.htm'.")]
public string RequestPath { get; set; }
Property Value
System.String
|
UriScheme
The (lowercased) URI scheme for this request (https, http, or ftp)
Declaration
[CodeDescription("URI Scheme for this HTTP Request; usually 'http' or 'https'")]
public string UriScheme { get; set; }
Property Value
System.String
|
UriUserInfo
Username:Password info for FTP URLs. (either null or "user:pass@") (Note: It's silly that this contains a trailing @, but whatever...)
Declaration
[CodeDescription("For FTP URLs, returns either null or user:pass@")]
public string UriUserInfo { get; }
Property Value
System.String
|
Methods
AssignFromString(String)
Parses a string and assigns the headers parsed to this object
Declaration
[CodeDescription("Replaces the current Request 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()
Clones the HTTP request headers
Declaration
public object Clone()
Returns
System.Object
The new HTTPRequestHeaders object, cast to an object |
GetEnumerator()
Warning: You should protect your enumeration using the GetReaderLock
Declaration
public IEnumerator<HTTPHeaderItem> GetEnumerator()
Returns
System.Collections.Generic.IEnumerator<HTTPHeaderItem>
|
ToByteArray(Boolean, Boolean, Boolean)
Returns a byte array representing the HTTP headers.
Declaration
[CodeDescription("Returns current Request Headers as a byte array.")]
public byte[] ToByteArray(bool prependVerbLine, bool appendEmptyLine, bool includeProtocolInPath)
Parameters
System.Boolean
prependVerbLine
TRUE if the HTTP REQUEST line (method+path+httpversion) should be included |
System.Boolean
appendEmptyLine
TRUE if there should be a trailing \r\n byte sequence included |
System.Boolean
includeProtocolInPath
TRUE if the SCHEME and HOST should be included in the HTTP REQUEST LINE |
Returns
System.Byte[]
The HTTP headers as a byte[] |
ToByteArray(Boolean, Boolean, Boolean, String)
Returns a byte array representing the HTTP headers.
Declaration
[CodeDescription("Returns current Request Headers as a byte array.")]
public byte[] ToByteArray(bool prependVerbLine, bool appendEmptyLine, bool includeProtocolInPath, string sVerbLineHost)
Parameters
System.Boolean
prependVerbLine
TRUE if the HTTP REQUEST line (method+path+httpversion) should be included |
System.Boolean
appendEmptyLine
TRUE if there should be a trailing \r\n byte sequence included |
System.Boolean
includeProtocolInPath
TRUE if the SCHEME and HOST should be included in the HTTP REQUEST LINE |
System.String
sVerbLineHost
Only meaningful if prependVerbLine is TRUE, the host to use in the HTTP REQUEST LINE |
Returns
System.Byte[]
The HTTP headers as a byte[] |
ToString()
Returns a string representing the HTTP headers, without the SCHEME+HOST in the HTTP request line, and no trailing CRLF
Declaration
[CodeDescription("Returns a string representing the HTTP Request.")]
public override string ToString()
Returns
System.String
The header string |
Overrides
ToString(Boolean, Boolean)
Returns a string representing the HTTP headers, without the SCHEME+HOST in the HTTP REQUEST line
Declaration
[CodeDescription("Returns a string representing the HTTP Request.")]
public string ToString(bool prependVerbLine, bool appendEmptyLine)
Parameters
System.Boolean
prependVerbLine
TRUE if the HTTP REQUEST line (method+path+httpversion) should be included |
System.Boolean
appendEmptyLine
TRUE if there should be a trailing CRLF sequence included |
Returns
System.String
The header string |
ToString(Boolean, Boolean, Boolean)
Returns a string representing the HTTP headers.
Declaration
[CodeDescription("Returns current Request Headers as a string.")]
public string ToString(bool prependVerbLine, bool appendEmptyLine, bool includeProtocolAndHostInPath)
Parameters
System.Boolean
prependVerbLine
TRUE if the HTTP REQUEST line (method+path+httpversion) should be included |
System.Boolean
appendEmptyLine
TRUE if there should be a trailing CRLF sequence included |
System.Boolean
includeProtocolAndHostInPath
TRUE if the SCHEME and HOST should be included in the HTTP REQUEST LINE (Automatically set to FALSE for CONNECT requests) |
Returns
System.String
The HTTP headers as a string. |