Skip to content

Commit 971c9a2

Browse files
committed
update example and remove empty line
1 parent 387df10 commit 971c9a2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ Usage
3232
The following sample server shows all features at once:
3333

3434
```js
35-
const Boom = require("boom")
36-
const HAPI = require("hapi")
35+
const Boom = require("@hapi/boom")
36+
const HAPI = require("@hapi/hapi")
37+
const HAPIAuthBasic = require("@hapi/basic")
3738
const HAPIWebSocket = require("hapi-plugin-websocket")
38-
const HAPIAuthBasic = require("hapi-auth-basic")
3939
const WebSocket = require("ws")
4040

4141
;(async () => {
@@ -191,8 +191,9 @@ $ curl -X POST --header 'Content-type: application/json' \
191191
{"at":"bar","mode":"http","seen":{"foo":42}}
192192

193193
# access the exclusive WebSocket route via REST
194-
$ curl -X POST --header 'Content-type: application/json' --data '{ "foo": 42 }' http://127.0.0.1:12345/baz
195-
{"statusCode":400,"error":"Bad Request","message":"HTTP request to a WebSocket-only route not allowed"}
194+
$ curl -X POST --header 'Content-type: application/json' \
195+
--data '{ "foo": 42 }' http://127.0.0.1:12345/baz
196+
{"statusCode":400,"error":"Bad Request","message":"Plain HTTP request to a WebSocket-only route not allowed"}
196197

197198
# access the combined REST/WebSocket route via WebSocket
198199
$ wscat --connect ws://127.0.0.1:12345/bar
@@ -322,7 +323,6 @@ server.route({
322323
...
323324
}
324325
})
325-
326326
```
327327
328328
Notice

0 commit comments

Comments
 (0)