use strict; use warnings; use URI; use LWP::UserAgent; my $ua = LWP::UserAgent->new(); $ua->proxy(['http'] => 'http://proxy.org.com:8080'); my $uri = URI->new('https://dev.preview.com/oauth2/default/v1/authorize'); $uri->query_form( client_id => 'XXXXXXXXXXXXXXX', response_type => 'code', scope => 'openid', redirect_uri => 'http%3A%2F%2Ftestchandan.com%3A5001', state => '1234', nonce => 'UBGW' ); $ua->get($uri); print Dumper "$uri\n";