lib/twilio-twimlbin.rb in twilio-twimlbin-0.0.4 vs lib/twilio-twimlbin.rb in twilio-twimlbin-0.0.5
- old
+ new
@@ -24,11 +24,11 @@
regex = Regexp.new("(#{find_url_regex}[^<]+)")
return res.body[regex]
end
def publish(xml)
- request = Net::HTTP::Post.new("/save_data")
- body = {'index' => @token, 'twiml' => xml}
+ request = Net::HTTP::Post.new("/#{@token}/update")
+ body = {'id' => @token, 'twiml' => xml}
request.set_form_data(body)
begin
return @http.request(request)
rescue => e
raise Gem::Exception, "Twimlbin: Error: #{e.message}"