- Home /
how to Post link ( Ruby Script) through unity3d ?
Hi, am facing a difficult problem. here i want to post a request to Server like this.
In Ruby, the call will look like this:
url = URI.parse('https://api.betable.com/1.0/token')
req = Net::HTTP::Post.new(url.path)
req.set_form_data(
{
:grant_type => 'authorization_code',
:code => params[:code],
:redirect_uri => "http://localhost:4567/callback"
})
req.basic_auth 'ApI_Key', 'ApI_SecRet'
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
response = http.request(req)
how to call this ?
please give ur valuable suggestions.
Comment
Answer by FormativeTech · Jun 01, 2012 at 12:46 PM
Have a look at the WWW module in the Unity Script Reference. http://unity3d.com/support/documentation/ScriptReference/WWW.html
Or indeed WWWForm which will allow you to do a post - not sure about that redirect though.