February 2018
Intermediate to advanced
246 pages
6h 3m
English
Let's try to post the book, Hackers: Heroes of the Computer Revolution to the Concierge endpoint, /api/feeder. We need to have the Concierge server running in another terminal window:
$ curl -X POST -d '{"title": "Hackers: Heroes of Computer Revolution", "url": "http://www.gutenberg.org/cache/epub/729/pg729.txt"}' http://localhost:8080/api/feeder | jq
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 162 100 51 100 111 51 111 0:00:01 --:--:-- 0:00:01 54000
{
"code": 200,
"msg": "Request is being processed."
}
Next, let's see what happens on the server:
$ go run main.go
2017/11/18 21:05:57 INFO - Adding API handlers...
2017/11/18 21:05:57 INFO - Starting feeder... ...Read now
Unlock full access