Aunque al final termine usando cURL, este es un script utilizado para hacer un post en Ruby
, recuerda configurar tus credenciales y el tipo de contenido:
full_url = "https://www.google.com/recaptcha/api/siteverify?secret=ACA_LA_CLAVE&remoteip=IP&response=KEY_RESPONSE"
uri = URI.parse(full_url)
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
headers = {'Content-Type' => "application/json", 'Accept-Encoding'=> "gzip,deflate",'Accept' => "application/json" }
request = Net::HTTP::Post.new(uri.request_uri, headers)
request.body = {'credentials' => {'username' => 'jorgesys', 'key' => 'bombonica'}}
response = http.request(request)