Songbird / Development / Songbird Add-Ons API Documentation

nsIHttpRequestHandler Interface Reference

An interface that handles HTTP requests. More...

import "nsIHttpServer.idl";

List of all members.

Public Member Functions

void handle (in nsIHttpRequestMetadata metadata, in nsIHttpResponse response)


Detailed Description

An interface that handles HTTP requests.

A representation of a handler for HTTP requests. The handler is used by calling its .handle method with data for an incoming request; it is the handler's job to use that data as it sees fit to make the desired response.

Note:
This interface uses the [function] attribute, so you can pass a script-defined function with the functionality of handle() to any method which has a nsIHttpRequestHandler parameter, instead of wrapping it in an otherwise empty object.

Definition at line 183 of file nsIHttpServer.idl.


Member Function Documentation

void nsIHttpRequestHandler::handle ( in nsIHttpRequestMetadata  metadata,
in nsIHttpResponse  response 
)

Processes the HTTP request represented by metadata and initializes the passed-in response to reflect the correct HTTP response.

Note that in some uses of nsIHttpRequestHandler, this method is required to not throw an exception; in the general case, however, this method may throw an exception (causing an HTTP 500 response to occur).

Parameters:
metadata data representing an HTTP request
response an initially-empty response which must be modified to reflect the data which should be sent as the response to the request described by metadata


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