Using XML and cfhttp ???
Refer: https://verify-email.org/home/api
I want to use their API to get a result back to see if an email address is valid.
So based on their documentation, I guess I do (something like) the following?
<cffunction name="email_verify" access="remote" returntype="string">
<cfargument name="email" type="string" required="true">
<cfoutput><cfhttp url="https://app.verify-email.org/api/v1/my key/verify/#arguments.email#" result="variables.resultxml" /></cfoutput>
<cfset variables.parsed_result = xmlParse(variables.resultxml.fileContent)>
<cfreturn variables.parsed_result>
</cffunction>
The above syntax is obviously wrong as I am getting a console error An error occurred while parsing an XML document.
What am I doing wrong?
(I tried without the <cfoutput> with same result. Not sure if I need them in there?
