A SERVICE OF

logo

38 Chapter 3
Syntax
resp.getObject();
Parameters
This function has no parameters.
setPath()
Sets the response file path. An optional parameter can set the response type.
Syntax
resp.setPath(filePath, RespType);
Parameters
filePath - sets the response file path. If the path does not specify a file system the default
is the read file system. See “File Systems” on page 14 for more information.
RespType - optional parameter that sets the response type:
RespType.Cached (the default) saves the response object or file to the MediaResults
cache directory so that future requests are returned directly by the filter.
RespType.Streamed bypasses the cache and returns the response data directly to the
filter.
RespType.Path returns the full native path of a file to the filter but does not copy the
file to the cache.
For more information, see “setResponseType()” on page 39.
Example
var img = new Media(); img.load(name @ "foo.jpg");
img.save(name @ "/bar.gif", type @ "gif");
resp.setPath("/bar.gif", RespType.Path);
getPath()
Returns the path of the current response Media object.
Parameters
This function takes the name of a Media object as its only parameter.
Syntax
resp.getPath(
<Media object>
);
setMedia()
Sets the response Media object to the specified object.
Parameters
This function takes the name of a Media object as its only parameter.