Description

Registers the directory path with the service mapping provided. If no service mapping is provided, the application name is used. If the rest application is already registered, it is refreshed.

Returns

Nothing

History

ColdFusion 11: Added the options parameter.

ColdFusion 10: Added this function.

Syntax

RestInitApplication( "dirPath" [, "serviceMapping", "options"] )

Parameters

Parameter

Description

dirPath

Required. Path to the directory to be registered.

serviceMapping

Optional. Alternate string to be used for application name while calling the REST service.

options

Optional. Additional options passed for initializing the application.

  • "host" - The application will be registered for the particular host. 
  • "useHost" - true/false - The application will extract the host from the URL and it will be used as the host name. 
  • "isdefault" - Specifies whether the application should be registered as a default application or not. For accessing a default application, the URL should not contain the application name.

Example

restInitApplication( dirPath=expandPath('path/to/REST/api'),serviceMapping='api');

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy