import "nsIHttpServer.idl";
Public Member Functions | |
void | setStatusLine (in string httpVersion, in unsigned short statusCode, in string description) |
void | setHeader (in string name, in string value, in boolean merge) |
void | write (in string data) |
Public Attributes | |
readonly attribute nsIOutputStream | bodyOutputStream |
Definition at line 295 of file nsIHttpServer.idl.
void nsIHttpResponse::setStatusLine | ( | in string | httpVersion, | |
in unsigned short | statusCode, | |||
in string | description | |||
) |
Sets the status line for this. 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".
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 |
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 | |||
) |
Sets the specified header in this.
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 |
NS_ERROR_INVALID_ARG | if name or value is not a valid header component |
void nsIHttpResponse::write | ( | in string | data | ) |
Write a string to the response's output stream.
readonly attribute nsIOutputStream nsIHttpResponse::bodyOutputStream |
A stream to which data appearing in the body of this response should be written.
Definition at line 341 of file nsIHttpServer.idl.