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

Represents HTTP request and response headers, mapping string header names to list of string values. More...

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...
 
string RemoveHeader (string headerName)
 Removes a header with the header name defined by headerName More...
 
void RemoveAll ()
 Removes all headers. More...
 
Dictionary< string, 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...
 

Detailed Description

Represents HTTP request and response headers, mapping string header names to list of string values.

Member Function Documentation

bool DotNetBrowser.HttpHeaders.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.
string DotNetBrowser.HttpHeaders.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.
Dictionary<string, string> DotNetBrowser.HttpHeaders.GetHeaders ( )

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

Returns
Dictionary contains all headers.
void DotNetBrowser.HttpHeaders.RemoveAll ( )

Removes all headers.

string DotNetBrowser.HttpHeaders.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.
void DotNetBrowser.HttpHeaders.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.