how to Post link ( Ruby Script) through unity3d ?

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('')
req =
  :grant_type => 'authorization_code',
  :code => params[:code],
  :redirect_uri => "http://localhost:4567/callback"
req.basic_auth 'ApI_Key', 'ApI_SecRet'
http =, url.port)
http.use_ssl = true
response = http.request(req)

how to call this ?

please give ur valuable suggestions.

Have a look at the WWW module in the Unity Script Reference.