Add a curl method, not fully tested