Created
January 28, 2021 18:31
-
-
Save kovyrin/b5aa828694d3b500caeab3afe911c375 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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