README.md in faye-websocket-0.10.8 vs README.md in faye-websocket-0.10.9
- old
+ new
@@ -58,11 +58,11 @@
# Return async Rack response
ws.rack_response
else
# Normal HTTP request
- [200, {'Content-Type' => 'text/plain'}, ['Hello']]
+ [200, { 'Content-Type' => 'text/plain' }, ['Hello']]
end
end
```
Note that under certain circumstances (notably a draft-76 client connecting
@@ -126,11 +126,11 @@
```rb
ws = Faye::WebSocket::Client.new('ws://www.example.com/', [], {
:proxy => {
:origin => 'http://username:password@proxy.example.com',
- :headers => {'User-Agent' => 'ruby'}
+ :headers => { 'User-Agent' => 'ruby' }
}
})
```
@@ -254,11 +254,11 @@
# Return async Rack response
es.rack_response
else
# Normal HTTP request
- [200, {'Content-Type' => 'text/plain'}, ['Hello']]
+ [200, { 'Content-Type' => 'text/plain' }, ['Hello']]
end
end
```
The `send` method takes two optional parameters, `:event` and `:id`. The default
@@ -291,10 +291,10 @@
For example, this creates a connection that allows access from any origin, pings
every 15 seconds and is retryable every 10 seconds if the connection is broken:
```ruby
es = Faye::EventSource.new(es,
- :headers => {'Access-Control-Allow-Origin' => '*'},
+ :headers => { 'Access-Control-Allow-Origin' => '*' },
:ping => 15,
:retry => 10
)
```