import "nsIHttpServer.idl";
Public Member Functions | |
void | handle (in nsIHttpRequestMetadata metadata, in nsIHttpResponse response) |
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.
Definition at line 183 of file nsIHttpServer.idl.
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).
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 |