my $method = 'POST'; my $url = "https://etc"; # note: actual url not shown here my $query_string = ""; # note: actual query string not shown here my $ua = new LWP::UserAgent; $ua->timeout(10); $ua->agent('Mozilla/4.6'); $ua->cookie_jar(HTTP::Cookies->new); $request = new HTTP::Request($method,$url); $request->content_type('application/x-www-form-urlencoded'); $request->content($query_string); $response_content = $ua->request($request)->content; LWP::Debug::debug("Response:\n$response_content\n"); #### LWP::UserAgent::new: () LWP::UserAgent::proxy: LWP::UserAgent::request: () LWP::UserAgent::send_request: POST LWP::UserAgent::_need_proxy: Not proxied LWP::Protocol::http::request: () LWP::UserAgent::request: Simple response: Internal Server Error Response: 500 Connect failed: connect: Connection timed out; Connection timed out