a wrapper for curl command