nsIHttpResponse Interface Reference

import "nsIHttpServer.idl";

Inheritance diagram for nsIHttpResponse:

Inheritance graph
[legend]
Collaboration diagram for nsIHttpResponse:

Collaboration graph
[legend]

List of all members.

Public Member Functions

void setStatusLine (in string httpVersion, in unsigned short statusCode, in string description)
 Sets the status line for this.
void setHeader (in string name, in string value, in boolean merge)
 Sets the specified header in this.
void write (in string data)
 Write a string to the response's output stream.

Public Attributes

readonly attribute nsIOutputStream bodyOutputStream
 A stream to which data appearing in the body of this response should be written.


Member Function Documentation

void nsIHttpResponse::setStatusLine ( in string  httpVersion,
in unsigned short  statusCode,
in string  description 
)

If this method is never called on this, the status line defaults to "HTTP/", followed by the server's default HTTP version (e.g. "1.1"), followed by " 200 OK".

Parameters:
httpVersion the HTTP version of this, as a string (e.g. "1.1"); if null, the server default is used
code the numeric HTTP status code for this
description a human-readable description of code; may be null if no description is desired
Exceptions:
NS_ERROR_INVALID_ARG if httpVersion is not a valid HTTP version string, statusCode is greater than 999, or description contains invalid characters

void nsIHttpResponse::setHeader ( in string  name,
in string  value,
in boolean  merge 
)

Parameters:
name the name of the header; must match the field-name production per RFC 2616
value the value of the header; must match the field-value production per RFC 2616
merge when true, if the given header already exists in this, the values passed to this function will be merged into the existing header, per RFC 2616 header semantics; when false, if the given header already exists in this, it is overwritten with the passed-in values; if the header doesn't exist in this, it is set regardless of the value of this parameter
Exceptions:
NS_ERROR_INVALID_ARG if name or value is not a valid header component

void nsIHttpResponse::write ( in string  data  ) 

Note:
This method is only guaranteed to work with ASCII data.


Member Data Documentation


The documentation for this interface was generated from the following file:

Generated Mozilla by doxygen 1.5.6