January 2018
Intermediate to advanced
336 pages
7h 22m
English
Although it’s great when everything goes according to plan, sometimes it doesn’t. One of the downsides of programming with Node-RED is that it can be difficult to track down problems when they occur. In this section, we’ll explore a few ways the book-search API from the last section might fail and how you can investigate and mitigate these failures.
To begin, let’s see what happens when the API caller omits the q query parameter. In your terminal, use curl with the -i and -v flags like so to include HTTP headers and produce verbose output:
| | $ curl -i -v localhost:1880/search |
| | * Trying 127.0.0.1... |
| | * Connected to localhost (127.0.0.1) port 1880 (#0) |
| | > GET /search HTTP/1.1 ... |
Read now
Unlock full access