i have the same setup as you, the only difference is that you ve set the SSH tunnel on the A host, i ve set it on host B. So i want to use the service of B inside A.
But it didnt work to put neither host A or B on the header of request.
i am having the same error as you, having a connection, but empty response, though the handler should clearly return some JSON.