README.md in async-http-0.48.2 vs README.md in async-http-0.49.0
- old
+ new
@@ -39,11 +39,11 @@
require 'async'
require 'async/http/internet'
data = {'life' => 42}
-Async.run do
+Async do
# Make a new internet:
internet = Async::HTTP::Internet.new
# Prepare the request:
headers = [['accept', 'application/json']]
@@ -70,11 +70,11 @@
#!/usr/bin/env ruby
require 'async'
require 'async/http/internet'
-Async.run do
+Async do
# Make a new internet:
internet = Async::HTTP::Internet.new
# Issues a GET request to Google:
response = internet.get("https://www.google.com/search?q=kittens")
@@ -96,10 +96,10 @@
require 'async/http/server'
require 'async/http/client'
require 'async/reactor'
require 'async/http/endpoint'
-require 'async/http/response'
+require 'async/http/protocol/response'
endpoint = Async::HTTP::Endpoint.parse('http://127.0.0.1:9294')
app = lambda do |request|
Protocol::HTTP::Response[200, {}, ["Hello World"]]