I’m trying to setup a proper cURL call in WordPress so am using wp_remote_post(). However, I’m having trouble authenticating the user via wp_remote_post(). Any idea how to convert the following to be used in wp_remote_post?
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");
Full example of proper cURL basic auth is here.