Some previous changes broke interrupting the debug on SigInterupt. This change restores
the original behaviour by passing a context to requests.
Since a new API client function was required to pass the context, I had
it also return an io.ReadCloser, so that output can be streamed to files
instead of fully buffering in process memory.