Skip to content

Instantly share code, notes, and snippets.

@kovyrin
Created January 28, 2021 18:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kovyrin/b5aa828694d3b500caeab3afe911c375 to your computer and use it in GitHub Desktop.
Save kovyrin/b5aa828694d3b500caeab3afe911c375 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'manticore'
require 'webmock'
WebMock.disable_net_connect!(allow: 'example.org')
WebMock.enable!
client = Manticore::Client.new
response = client.get('https://example.org').on_success do |response|
response.body do |chunk|
puts "CHUNK: #{chunk.inspect}"
end
end
puts "Response headers: #{response.headers.inspect}"
#!/usr/bin/env ruby
require 'manticore'
client = Manticore::Client.new
response = client.get('https://example.org').on_success do |response|
response.body do |chunk|
puts "CHUNK: #{chunk.inspect}"
end
end
puts "Response headers: #{response.headers.inspect}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment