Skip to content

Instantly share code, notes, and snippets.

@andresmafra
Created May 15, 2022 11:30
Show Gist options
  • Save andresmafra/e3144064f3184bfb495d28d183ed0db6 to your computer and use it in GitHub Desktop.
Save andresmafra/e3144064f3184bfb495d28d183ed0db6 to your computer and use it in GitHub Desktop.
require "uri"
require "net/http"
url = URI("https://api.vistoriei.com.br/v1/contract/ID_DA_VISTORIA")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer {SEU_TOKEN}"
response = https.request(request)
puts response.read_body
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment