Skip to content

Latest commit

 

History

History
16 lines (12 loc) · 370 Bytes

Ruby-NET-HTTP.md

File metadata and controls

16 lines (12 loc) · 370 Bytes
require 'uri'
require 'net/http'

url = URI("https://api.storyblok.com/v1/cdn/stories/home?token=xs8KfuZGvQVOM824AFUQDQtt")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["cache-control"] = 'no-cache'

response = http.request(request)
puts response.read_body