header = { content_type: “application/x-www-form-urlencoded” }
url_data = “user=#{ENV[‘OTP_USER’]}&pass=#{ENV[‘OTP_PASSWORD’]}&sms[0][0]=#{mobile}&sms[0][1]=#{otp}&sms[0][2]=#{otp}&sid=#{ENV[‘OTP_SID’]}”
uri = URI.parse(‘http://..*./server.php’)
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Post.new(uri.request_uri, header)
Rails.logger.info url_data
request.body = url_data
response = http.request(request)
Response:
end of file reached