cfc calling in browsers

If you ever asked yourself how to take a quick look inside a coldfusion cfc directly in a browser, check this out. If your cfc is in the webroot you can call it of course in a browser as usual:

http://www.domain.com/path/example.cfc

If you call a cfc this way the „cfc explorer“ appeares on stage and shows you auto-generated documentation of the cfc.
Additonally you can invoke a function directly in a browser:

http://www.domain.com/example.cfc?method=examplefunction

A request like this will actually invoke the method specified as url-parameter „method“.
Take care: the cffunction access-attribute must be specified as remote.

Schreibe einen Kommentar