http curl client implementation