added http.shutdown to bottome of send function