
40 Chapter 3
•
•
•
•
setSaveParameters()
Sets the response save parameters for the response media object.
Syntax
resp.setSaveParameters(
<save parameters>
);
Parameters
save parameters - specified as either an object, or in the standard syntax (for example,
type @ “jpeg”). These parameters are passed directly to the Media object save method.
For a description of these parameters, see “save()” on page 124.
getSaveParameters()
Returns the current save parameters for the response Media object.
Syntax
resp.getSaveParameters();
Parameters
This function has no parameters.
setMimeType()
Sets the response MIME type.
Syntax
resp.setMimeType("text/xml");
Parameters
mimeType - specifies the type of response. The default type depends on the response type:
•
For files, it is determined automatically based on the file extension.
•
For object responses, it is based on the value returned by the _MR_save() method of
the object.
getMimeType()
Returns the response MIME type or, if not set, undefined.
Syntax
var mimeType = req.getMimeType();
Parameters
This function has no parameters.
setHeader()
Sets a HTTP response header with the given name/value pair.
Syntax
resp.setHeader("name", "value");