That's true, but it's no better there, either.
Here's some sample curl client code in PHP.
$c = curl_init("https://someurl/some/api");
$msg = /* some data here */
$opts = array(
CURLOPT_POST=>TRUE,
CURLOPT_USERPWD=>"<password string>",
CURLOPT_HTTPHEADER=>array("Content-type: application/json"),
CURLOPT_POSTFIELDS=>$msg,
CURLOPT_SSL_VERIFYPEER=>FALSE,
CURLOPT_RETURNTRANSFER=>TRUE
);
curl_setopt_array($c, $opts);
$d = curl_exec($c);
curl_close($c);
Every option in that ugly argument array corresponds directly to a commandline option.