How to install curl using Homebrew and take precedence over the one Mac built-in

brew install curl
echo 'export PATH="/usr/local/opt/curl/bin:$PATH"' >> ~/.zprofile