Skip to content

Instantly share code, notes, and snippets.

@starrhorne
Created January 19, 2012 02:29
Show Gist options
  • Save starrhorne/1637301 to your computer and use it in GitHub Desktop.
Save starrhorne/1637301 to your computer and use it in GitHub Desktop.
class PhoneCallsController < ApplicationController
def create
http = Net::HTTP.new('clients4.google.com', 443)
http.use_ssl = true
path = '/voice/embed/webButtonConnect'
request_params = params[:phone_call].map { |k, v| "#{ CGI.escape(k) }=#{ CGI.escape(v) }" }.join("&")
request_headers = {}
resp, data = http.post(path, request_params, request_headers)
render :text => data
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment