Last active
April 5, 2016 21:44
-
-
Save shaik2many/4f8194f199c5f2dfc6253b3f15aca4d5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfcomponent extends="taffy.core.resource" taffy:uri="/students"> | |
<cffunction name="get"> | |
<cfset var local = {} /> | |
<cfquery name="local.qGetStudents">SELECT * FROM tpcdba01.tpc_static_name_value</cfquery> | |
<cfreturn representationOf( local.qGetStudents ) /> | |
</cffunction> | |
</cfcomponent> | |
or | |
component extends="taffy.core.resource" taffy_uri="/{conn_name}/{period_name}/stats" { | |
function get(required string attr1, | |
required string attr2){ | |
WriteLog(type="Info", file="myapp", text="Stats-REST-Service: "&attr1&":"&attr2); | |
var soaService = new myapp.wwwroot.services.cfcname(); | |
var response = soaService.methodname(attr1, attr2); | |
return representationOf(response).withStatus(200); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment