DotNetBrowser  1.14
Public Member Functions | List of all members
DotNetBrowser.HttpHeadersEx Interface Reference

Represents HTTP request/response header More...

Inherited by DotNetBrowser.HttpHeadersExImpl.

Public Member Functions

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 > headerValue)
 Sets a new header using headerName as key and headerValue as values list. If such a header already exists, it will be overridden. More...
 
List< string > RemoveHeader (string headerName)
 Removes a header with the header name defined by headerName More...
 
void RemoveAll ()
 Removes all headers. More...
 
Dictionary< string, List< string > > GetHeaders ()
 Returns all headers. Changes in this collection does not affect original headers. More...
 
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...
 
List< string > GetHeaders (string headerName)
 Returns all headers as key-value pair. Changes in this collection does not affect original headers. More...
 

Detailed Description

Represents HTTP request/response header

Member Function Documentation

bool DotNetBrowser.HttpHeadersEx.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.

Implemented in DotNetBrowser.HttpHeadersExImpl.

string DotNetBrowser.HttpHeadersEx.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.

Implemented in DotNetBrowser.HttpHeadersExImpl.

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

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

Returns
Dictionary contains all headers.

Implemented in DotNetBrowser.HttpHeadersExImpl.

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

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

Returns
Dictionary contains all headers.

Implemented in DotNetBrowser.HttpHeadersExImpl.

void DotNetBrowser.HttpHeadersEx.RemoveAll ( )

Removes all headers.

Implemented in DotNetBrowser.HttpHeadersExImpl.

List<string> DotNetBrowser.HttpHeadersEx.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.

Implemented in DotNetBrowser.HttpHeadersExImpl.

void DotNetBrowser.HttpHeadersEx.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.

Implemented in DotNetBrowser.HttpHeadersExImpl.

void DotNetBrowser.HttpHeadersEx.SetHeaders ( string  headerName,
List< string >  headerValue 
)

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.
headerValueheader values list.
Exceptions
ArgumentExceptionwhen headerName is null or empty, headerValue is null.

Implemented in DotNetBrowser.HttpHeadersExImpl.