Fundamentals
Multicloud
Examples
SDKs
Batch Processing
Specifications
Best Practice
Error Codes
require "net/http" require "net/https" require "uri" require "json" uri = URI.parse("https://neutrinoapi.net/ip-info") http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true request = Net::HTTP::Post.new(uri.request_uri) request.set_form_data( { "user-id" => "YOUR_USER_ID", "api-key" => "YOUR_API_KEY", "ip" => "162.209.104.195" }) response = http.request(request) result = JSON.parse response.body print result['country'], "\n" print result['country-code'], "\n" print result['region'], "\n" print result['city'], "\n"