DotNetBrowser  1.14
Public Member Functions | List of all members
DotNetBrowser.HttpHeadersExImpl Class Reference

Represents HTTP request/response header More...

Inherits DotNetBrowser.HttpHeadersEx.

Public Member Functions

bool ContainsHeader (string headerName)
 Returns true if a header with the header name defined by headerName is exists. More...
 
string GetHeader (string headerName)
 Returns a header with the header name defined by headerName. More...
 
Dictionary< string, List< string > > GetHeaders ()
 Returns all headers as key-value pair. Changes in this collection does not affect original headers. More...
 
List< string > GetHeaders (string headerName)
 Returns all headers. Changes in this collection does not affect original headers. More...
 
void RemoveAll ()
 Removes all headers. More...
 
List< string > RemoveHeader (string headerName)
 Removes a header with the header name defined by headerName More...
 
void SetHeader (string headerName, string headerValue)
 Sets a new header using headerName as key andheaderValue as value. If such a header already exists, it will be overridden. More...
 
void SetHeaders (string headerName, List< string > headerValues)
 Sets a new header using headerName as key and headerValue as values list. If such a header already exists, it will be overridden. More...
 
override string ToString ()
 Returns all readers as the string representation. More...
 

Detailed Description

Represents HTTP request/response header

Member Function Documentation

bool DotNetBrowser.HttpHeadersExImpl.ContainsHeader ( string  headerName)

Returns true if a header with the header name defined by headerName is exists.

Parameters
headerNameheader name.
Returns
true if the header with header name defined by headerName is exists.
Exceptions
ArgumentExceptionwhen headerName is null or empty.

Implements DotNetBrowser.HttpHeadersEx.

string DotNetBrowser.HttpHeadersExImpl.GetHeader ( string  headerName)

Returns a header with the header name defined by headerName.

Parameters
headerNameheader name.
Returns
header value or null if header with this headerName does not exists.
Exceptions
ArgumentExceptionwhen headerName is null or empty.

Implements DotNetBrowser.HttpHeadersEx.

Dictionary<string, List<string> > DotNetBrowser.HttpHeadersExImpl.GetHeaders ( )

Returns all headers as key-value pair. Changes in this collection does not affect original headers.

Returns
Dictionary contains all headers.

Implements DotNetBrowser.HttpHeadersEx.

List<string> DotNetBrowser.HttpHeadersExImpl.GetHeaders ( string  headerName)

Returns all headers. Changes in this collection does not affect original headers.

Returns
Dictionary contains all headers.

Implements DotNetBrowser.HttpHeadersEx.

void DotNetBrowser.HttpHeadersExImpl.RemoveAll ( )

Removes all headers.

Implements DotNetBrowser.HttpHeadersEx.

List<string> DotNetBrowser.HttpHeadersExImpl.RemoveHeader ( string  headerName)

Removes a header with the header name defined by headerName

Parameters
headerNameheader name.
Returns
header value which has been removed or null if header with this headerName does not exists.
Exceptions
ArgumentExceptionwhen headerName is null or empty.

Implements DotNetBrowser.HttpHeadersEx.

void DotNetBrowser.HttpHeadersExImpl.SetHeader ( string  headerName,
string  headerValue 
)

Sets a new header using headerName as key andheaderValue as value. If such a header already exists, it will be overridden.

Parameters
headerNameheader name.
headerValueheader value.
Exceptions
ArgumentExceptionwhen headerName is null or empty, headerValue is null.

Implements DotNetBrowser.HttpHeadersEx.

void DotNetBrowser.HttpHeadersExImpl.SetHeaders ( string  headerName,
List< string >  headerValues 
)

Sets a new header using headerName as key and headerValue as values list. If such a header already exists, it will be overridden.

Parameters
headerNameheader name.
headerValuesheader values list.
Exceptions
ArgumentExceptionwhen headerName is null or empty, headerValue is null.

Implements DotNetBrowser.HttpHeadersEx.

override string DotNetBrowser.HttpHeadersExImpl.ToString ( )

Returns all readers as the string representation.