Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'net/http'
- require 'json'
- # require 'debugger'
- # require 'uri'
- # require 'httparty'
- x = {:client_id => "",
- :client_secret => "",
- :scope => "http://api.microsofttranslator.com",
- :grant_type => "client_credentials" }
- auth_uri = URI "https://datamarket.accesscontrol.windows.net/v2/OAuth2-13"
- # y = "https://datamarket.accesscontrol.windows.net/v2/OAuth2-13/"
- # z = HTTParty.post(y,x)
- z = Net::HTTP.post_form auth_uri,x
- # p JSON.parse(z.body)
- # debugger
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement