User's Manual

MediaScript Objects and Methods 33
Example
function main() {
var respText = new TextResponse(TextResponse.TypePlain);
var headers = req.getHeaderNames();
for (var i = 0; i < headers.length; ++i)
{
respText.append(headers[i] + ": " +
req.getHeader(headers[i]) + "\n");
}
resp.setObject(respText, RespType.Streamed);
}
Sample Output
accept: */*
accept-encoding: gzip, deflate
accept-language: en-us
connection: Keep-Alive
host: localhost
user-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
Q312461)
getFileParamNames()
Returns an array containing the names of all file parameters. File parameters describe files
that have been sent to the Media Generator through the .NET or Java APIs for processing.
The names returned by this method may be used in conjunction with
getFileParamPath() to locate the files reference by the file parameters. These names
are specified when the file is added as a parameter to a request using the .NET of Java APIs.
Please refer to the Java or .NET API documentation for more details.
Syntax
var fileNameList = req.getFileParamNames();
Parameters
This function takes no parameters.
getFileParamPath()
Returns the path to the file associated with the specified file parameter name.
Syntax
var myImageFile = req.getFileParamPath("paramName");
Parameters
paramName - the name specified for the file parameter when it was set with the request.