Corrected HTTPClient functionality