in source/rest.c [316:330]
static void s_on_stream_complete_fn(struct aws_http_stream *stream, int error_code, void *user_data) {
(void)error_code;
struct request_ctx *ctx = user_data;
aws_http_stream_release(stream);
ctx->error_code = error_code;
if (error_code == AWS_OP_SUCCESS) {
ctx->response->__cursor = aws_byte_cursor_from_buf(&ctx->response->__data);
aws_http_message_set_body_stream(
ctx->response->response,
aws_input_stream_new_from_cursor(ctx->response->allocator, &ctx->response->__cursor));
}
aws_condition_variable_notify_all(&ctx->c_var);
}