Songbird / Development / Songbird Add-Ons API Documentation

nsIHttpRequestMetadata Interface Reference

An interface that represents the data included in an HTTP request. More...

import "nsIHttpServer.idl";

List of all members.

Public Member Functions

string getHeader (in string fieldName)
boolean hasHeader (in string fieldName)

Public Attributes

readonly attribute string method
readonly attribute string host
readonly attribute unsigned
long 
port
readonly attribute string path
readonly attribute string queryString
readonly attribute string httpVersion
readonly attribute nsISimpleEnumerator headers


Detailed Description

An interface that represents the data included in an HTTP request.

Definition at line 208 of file nsIHttpServer.idl.


Member Function Documentation

string nsIHttpRequestMetadata::getHeader ( in string  fieldName  ) 

Returns the value for the header in this request specified by fieldName.

Parameters:
fieldName the name of the field whose value is to be gotten; note that since HTTP header field names are case-insensitive, this method produces equivalent results for "HeAdER" and "hEADer" as fieldName
Returns:
the field value for the given header; note that this value may be normalized (e.g., leading/trailing whitespace removed from the value [or from the values which make this up, if the header is a comma-separated list of values], whitespace runs compressed to single spaces, etc.)
Exceptions:
NS_ERROR_INVALID_ARG if fieldName does not constitute a valid header field name
NS_ERROR_NOT_AVAILABLE if the given header does not exist in this

boolean nsIHttpRequestMetadata::hasHeader ( in string  fieldName  ) 

Returns true if a header with the given field name exists in this, false otherwise.

Parameters:
fieldName the field name whose existence is to be determined in this; note that since HTTP header field names are case-insensitive, this method produces equivalent results for "HeAdER" and "hEADer" as fieldName
Exceptions:
NS_ERROR_INVALID_ARG if fieldName does not constitute a valid header field name


Member Data Documentation

readonly attribute string nsIHttpRequestMetadata::method

The request type for this request (see RFC 2616, section 5.1.1).

Definition at line 213 of file nsIHttpServer.idl.

readonly attribute string nsIHttpRequestMetadata::host

The host of the data being requested (e.g. "localhost" for the http://localhost:8080/file resource). Note that the relevant port on the host is specified in this.port.

Definition at line 220 of file nsIHttpServer.idl.

readonly attribute unsigned long nsIHttpRequestMetadata::port

The port on the server on which the request was received.

Definition at line 225 of file nsIHttpServer.idl.

readonly attribute string nsIHttpRequestMetadata::path

The requested path, without any query string (e.g. "/dir/file.txt"). It is guaranteed to begin with a "/". This string is in the

Definition at line 231 of file nsIHttpServer.idl.

readonly attribute string nsIHttpRequestMetadata::queryString

The URL-encoded query string associated with this request, not including the initial "?".

Definition at line 237 of file nsIHttpServer.idl.

readonly attribute string nsIHttpRequestMetadata::httpVersion

A string containing the HTTP version of the request (i.e., "1.1"). Leading zeros for either component of the version will be omitted. (In other words, if the request contains the version "1.01", this attribute will be "1.1"; see RFC 2616, section 3.1.)

Definition at line 245 of file nsIHttpServer.idl.

readonly attribute nsISimpleEnumerator nsIHttpRequestMetadata::headers

An nsISimpleEnumerator over the names of the headers in this request. The header field names in the enumerator may not necessarily have the same case as they do in the request itself.

Definition at line 284 of file nsIHttpServer.idl.


The documentation for this interface was generated from the following file:
Generated on Tue Mar 10 14:28:56 2009 for Songbird by  doxygen 1.5.2