1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-04-26 13:48:49 +08:00

Update API example

New behavior was introduced in 5c9d44f391
This commit is contained in:
Anton Koldaev 2016-01-10 19:35:30 -06:00 committed by deadprogram
parent dc183d7a78
commit a3bf957100

View File

@ -168,8 +168,7 @@ You can also specify the api host and port, and turn on authentication:
gbot := gobot.NewGobot()
server := api.NewAPI(gbot)
server.Port = "4000"
server.Username = "Gort"
server.Password = "klaatu"
server.AddHandler(api.BasicAuth("gort", "klatuu"))
server.Start()
```