null check for headers in http client, added logging of response code in http client callback