I'm currently learning in HTB, to use the curl command for basic authentication, assuming that you need to give user name and password before accessing the webpage, use:
curl -u userName:userPassword 'http://ip_address:port' -H 'Authorization: Basic base64encodetext'