Description
Sets the custom responses.
History
ColdFusion 10: Added this function
1 | restSetResponse(response) |
Parameter |
Description |
---|---|
response |
A struct that contains the response details. |
Note: ColdFusion ignores the function's return value and uses the response set using the RestSetResponse() function. |
1 2 3 4 5 6 7 8 9 10 11 12 | < cffunction name= "create" httpMethod= "POST" produces= "application/xml" > < cfargument name= "id" type= "numeric" > < cfargument name= "name" type= "String" > < cfset var response={ status=201, content= "<customer id=" &id& "><name>" &name& "</name></customer>" >, headers={ } }> < cfset restSetResponse(response)> < cffunction > |