-
-
Save kylejmhudson/4e8a6154da72972dce50 to your computer and use it in GitHub Desktop.
Try and then update
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
<!— Start a call from coldfusion —> | |
<!— enter your information for the following parameters —> | |
<cfset api_key="abc123"> | |
<cfset api_secret="abc123"> | |
<!— make the rest request —> | |
<cfhttp url="https://rest.nexmo.com/number/buy/" method="post" charset="utf-8"> | |
<cfhttpparam name="Accept" value="application/xml" type="header"> | |
<cfhttpparam name="api_key" value="#api_key#" type="FormField"> | |
<cfhttpparam name="api_secret" value="#api_secret#" type="FormField"> | |
<cfhttpparam name="country" value="US" type="FormField"> | |
<cfhttpparam name="msisdn" value="11234567890" type="formField"> | |
</cfhttp> | |
<!— display results —> | |
<cfoutput> | |
HTTP Response = #cfhttp.statusCode# <br> | |
<textarea cols="80" rows="10"> | |
#cfhttp.fileContent# | |
</textarea> | |
</cfoutput> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment