Add checking of return code of HTTP request.