Created
September 17, 2014 19:35
-
-
Save kwhinnery/cff076791170fc9ba175 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
# create a route that will respond to an incoming POST request from Twilio | |
post '/message' do | |
# Create a TwiML response object - this object helps us generate an XML string | |
# that we will return as the result of this request | |
twiml = Twilio::TwiML::Response.new do |r| | |
r.Message do |m| | |
m.Body 'Trust Pound!' | |
m.Media 'http://i.imgur.com/Act0Q.gif' | |
end | |
end | |
# set the Content-Type header of the response for XML | |
content_type 'text/xml' | |
twiml.text | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment