Handle the response of the initial HTTP request in the StatementClient

An attempt to fix #1402.