proper handling of http_codes in http.post_cmd