Request Result
This request
was successful.
failed.
CFML Code Used
#60;--- Create an instance of the TwilioLib, this is a singleton so it could be persisted in the Application scope or handled via a DI engine such as ColdSpring ---#62;
#60;cfset twilio = createObject("component", "TwilioLib").init(#_accountsid#, #_authtoken#) /#62;
#60;--- Create a new structure that will hold the request parameters ---#62;
#60;cfset rData = StructNew() /#62;
#60;--- Add all the parameters to the structure ---#62;
#60;cfset rData.#f# = #FORM[f]# /#62;
#60;--- Call the newRequest method from the TwilioLib object that was created previously, or is persisted in the application ---#62;
#60;cfset requestObj = twilio.newRequest("#resourceUri#", "#resourceMethod#", rData) /#62;
#60;--- Check to see if the request was successful using the wasSuccessful method from the response object ---#62;
requestObj.getResponse().wasSuccessful()
#60;--- Get the raw text response ---#62;
requestObj.getResponse().asString()
#60;--- Get the response as CFML Object ---#62;
requestObj.getResponse().output()
#cfmlcode#