Added more logging to the HTTP gateway.

Changed the way that JSON parameters were looked for from
if ($param)
to
if (!empty($param))

This change happened so long ago, I forget why I did it, but I'm
committing it now.