async-http 0.17.0 → 0.17.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -2
- data/Rakefile +2 -0
- data/lib/async/http/server.rb +3 -0
- data/lib/async/http/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a529cc7156fef7700b2d40a03ae88512fe7ad34efcba524a17a23c5bc4bead5
|
4
|
+
data.tar.gz: 06e805dcf6fb6dacf9f00317238026f1faa97c7dbe294f22111cf1e333d6c827
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 153939bf31fb232c81681feed848f0f6cf10656609f2755006297a8ff6bb93c7646aa3cfc5f489a680d2c29370fa4069d4de472a7e0860a3b7a932cf60a47c5a
|
7
|
+
data.tar.gz: da73399d0615db7aaf78fc008e914819b6da85b79c8d25d521ef2d7c756895bdbca4506754344979493e14a53fd95cdb7bec34ce4d332951508ac8d9a711fa7f
|
data/README.md
CHANGED
@@ -31,11 +31,14 @@ Or install it yourself as:
|
|
31
31
|
Here is a basic example of a client/server running in the same reactor:
|
32
32
|
|
33
33
|
```ruby
|
34
|
+
#!/usr/bin/env ruby
|
35
|
+
|
34
36
|
require 'async/http/server'
|
35
37
|
require 'async/http/client'
|
36
38
|
require 'async/reactor'
|
39
|
+
require 'async/http/url_endpoint'
|
37
40
|
|
38
|
-
endpoint = Async::
|
41
|
+
endpoint = Async::HTTP::URLEndpoint.parse('http://127.0.0.1:9294', reuse_port: true)
|
39
42
|
|
40
43
|
class Server < Async::HTTP::Server
|
41
44
|
def handle_request(request, peer, address)
|
@@ -52,7 +55,7 @@ Async::Reactor.run do |task|
|
|
52
55
|
end
|
53
56
|
|
54
57
|
response = client.get("/", {})
|
55
|
-
puts response.
|
58
|
+
puts response.read
|
56
59
|
|
57
60
|
server_task.stop
|
58
61
|
end
|
data/Rakefile
CHANGED
data/lib/async/http/server.rb
CHANGED
data/lib/async/http/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: async-http
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.17.
|
4
|
+
version: 0.17.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async
|