Click or drag to resize
HTTPRequestHeaders Class
HTTP Request headers object
Inheritance Hierarchy

Namespace: Fiddler
Assembly: FiddlerCore4 (in FiddlerCore4.dll) Version: 4.6.2.0
Syntax
public class HTTPRequestHeaders : HTTPHeaders, 
	ICloneable, IEnumerable<HTTPHeaderItem>, IEnumerable

The HTTPRequestHeaders type exposes the following members.

Constructors
Methods
  NameDescription
Public methodAdd
Adds a new header containing the specified name and value.
(Inherited from HTTPHeaders.)
Public methodAddRange
Adds one or more headers
(Inherited from HTTPHeaders.)
Public methodAllValues
Returns all values of the named header in a single string, delimited by commas
(Inherited from HTTPHeaders.)
Public methodAssignFromString
Parses a string and assigns the headers parsed to this object
(Overrides HTTPHeadersAssignFromString(String).)
Public methodByteCount (Overrides HTTPHeadersByteCount.)
Public methodClone
Clones the HTTP request headers
Public methodCount
Number of HTTP headers
(Inherited from HTTPHeaders.)
Public methodCountOf
Returns the count of instances of the named header
(Inherited from HTTPHeaders.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodExists
Determines if the Headers collection contains a header of the specified name, with any value.
(Inherited from HTTPHeaders.)
Public methodExistsAndContains
Determines if the Headers collection contains one or more headers of the specified name, and sHeaderValue is part of one of those Headers' value.
(Inherited from HTTPHeaders.)
Public methodExistsAndEquals
Determines if the Headers collection contains a header of the specified name, and sHeaderValue=Header's value. Similar to a case-insensitive version of: headers[sHeaderName]==sHeaderValue, although it checks all instances of the named header.
(Inherited from HTTPHeaders.)
Public methodExistsAny
Determines if the Headers collection contains any header from the specified list, with any value.
(Inherited from HTTPHeaders.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFindAll
Returns all instances of the named header
(Inherited from HTTPHeaders.)
Protected methodFreeReaderLock (Inherited from HTTPHeaders.)
Protected methodFreeWriterLock
If you get the Writer lock, Free it ASAP or you're going to hang or deadlock the Session
(Inherited from HTTPHeaders.)
Public methodGetEnumerator
Warning: You should protect your enumeration using the GetReaderLock
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Protected methodGetReaderLock
Get the Reader Lock if you plan to enumerate the Storage collection.
(Inherited from HTTPHeaders.)
Public methodGetTokenValue
Returns the Value from a token in the header. Correctly handles double-quoted strings. Requires semicolon for delimiting tokens Limitation: FAILS if semicolon is in token's value, even if quoted. FAILS in the case of crazy headers, e.g. Header: Blah="SoughtToken=Blah" SoughtToken=MissedMe We really need a "proper" header parser
(Inherited from HTTPHeaders.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodGetWriterLock
Get the Writer Lock if you plan to change the Storage collection. NB: You only need this lock if you plan to change the collection itself; you can party on the items in the collection if you like without locking.
(Inherited from HTTPHeaders.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRemove(String)
Removes all headers from the header collection which have the specified name.
(Inherited from HTTPHeaders.)
Public methodRemove(HTTPHeaderItem)
Removes a HTTPHeader item from the collection
(Inherited from HTTPHeaders.)
Public methodRemoveAll
Removes all HTTPHeader items from the collection
(Inherited from HTTPHeaders.)
Public methodRemoveRange
Removes all headers from the header collection which have the specified names.
(Inherited from HTTPHeaders.)
Public methodRenameHeaderItems
Renames all headers in the header collection which have the specified name.
(Inherited from HTTPHeaders.)
Public methodToArray
Copies the Headers to a new array. Prefer this method over the enumerator to avoid cross-thread problems.
(Inherited from HTTPHeaders.)
Public methodToByteArray(Boolean, Boolean, Boolean)
Returns a byte array representing the HTTP headers.
Public methodToByteArray(Boolean, Boolean, Boolean, String)
Returns a byte array representing the HTTP headers.
Public methodToString
Returns a string representing the HTTP headers, without the SCHEME+HOST in the HTTP request line, and no trailing CRLF
(Overrides ObjectToString.)
Public methodToString(Boolean, Boolean)
Returns a string representing the HTTP headers, without the SCHEME+HOST in the HTTP REQUEST line
Public methodToString(Boolean, Boolean, Boolean)
Returns a string representing the HTTP headers.
Top
Fields
  NameDescription
Protected field_HeaderEncoding
Text encoding to be used when converting this header object to/from a byte array
(Inherited from HTTPHeaders.)
Public fieldHTTPMethod
The HTTP Method (e.g. GET, POST, etc)
Public fieldHTTPVersion
HTTP version (e.g. HTTP/1.1)
(Inherited from HTTPHeaders.)
Protected fieldstorage
Storage for individual HTTPHeaderItems in this header collection NB: Using a list is important, as order can matter
(Inherited from HTTPHeaders.)
Top
Properties
  NameDescription
Public propertyItemInt32
Indexer property. Returns HTTPHeaderItem by index. Throws Exception if index out of bounds
(Inherited from HTTPHeaders.)
Public propertyItemString
Gets or sets the value of a header. In the case of Gets, the value of the first header of that name is returned. If the header does not exist, returns null. In the case of Sets, the value of the first header of that name is updated. If the header does not exist, it is added.
(Inherited from HTTPHeaders.)
Public propertyRawPath
Get or set the request path as a byte array
Public propertyRequestPath
Get or set the request path as a string
Public propertyUriScheme
The (lowercased) URI scheme for this request (https, http, or ftp)
Public propertyUriUserInfo
Username:Password info for FTP URLs. (either null or "user:[email protected]") (Note: It's silly that this contains a trailing @, but whatever...)
Top
See Also