replace curl by Net:HTTP for compatibility