您需要手动构造HTTP请求,并将其传递给LWP。应该执行以下操作:
my $uri = 'https://orbit.theplanet.com/Login.aspx?url=/Default.aspx';my $json = '{"username":"foo","password":"bar"}';my $req = HTTP::Request->new( 'POST', $uri );$req->header( 'Content-Type' => 'application/json' );$req->content( $json );然后,您可以使用LWP执行请求:
my $lwp = LWP::UserAgent->new;$lwp->request( $req );



