in reply to LWP::Curl and CURLOPT_USERPWD

Looking at the source code, it seems that LWP::Curl doesn't pass through all options to Net::Curl::Easy but only the ones it knows about.

You should be able to set the additional options by using:

$lwpcurl->{agent}->setopt( CURLOPT_USERPWD, "$user:$password" );

Replies are listed 'Best First'.
Re^2: LWP::Curl and CURLOPT_USERPWD
by wanderedinn (Sexton) on Jun 06, 2016 at 18:07 UTC

    Thanks, I tried that and got:

    Argument "CURLOPT_USERPWD" isn't numeric in subroutine entry at ./biphttppost.pl line 8 (#2) (W numeric) The indicated string was fed as an argument to an operator that expected a numeric value instead. If you're fortunate the message will identify which operator was so unfortunate.

      Most likely, you will need to import CURLOPT_USERPWD from Net::Curl or Net::Curl::Easy. In fact, Curl::LWP has this line at its top:

      use Net::Curl::Easy qw(:constants)

      Maybe by adding that same line to your code you get the values for CURLOPT_USERPWD imported into your code as well.

        That does not seem to address the issue either. Getting the same error message.