mirror of
https://github.com/Kong/insomnia.git
synced 2026-04-22 23:28:33 -04:00
14 lines
269 B
Ruby
Executable File
14 lines
269 B
Ruby
Executable File
require 'uri'
|
|
require 'net/http'
|
|
|
|
url = URI("http://mockbin.com/har")
|
|
|
|
http = Net::HTTP.new(url.host, url.port)
|
|
|
|
request = Net::HTTP::Get.new(url)
|
|
request["accept"] = 'application/json'
|
|
request["x-foo"] = 'Bar'
|
|
|
|
response = http.request(request)
|
|
puts response.read_body
|