use strict;
use HTML::Form;
use LWP::UserAgent;
use HTTP::Request::Common;
use HTTP::Cookies;
my $ua = LWP::UserAgent->new();
$ua->requests_redirectable(['POST']);
# Setup cookie jar
$ua->cookie_jar(HTTP::Cookies->new(file=>'/tmp/cookie_jar'));
# Give the browser a name
$ua->agent("Netscape/7.2");
# Set the timeout value - only wait 60 seconds.
$ua->timeout(180);
my %form={"genotypeSource"=>"pga",
"nickGene"=>"a4galt",
"nickPopulation"=>"All",
"outputBy"=>"Local_Position",
"displayBy"=>"Table/Image",
"freq"=>"0",
"noMonomorphic"=>"",
"clusterSnp"=>"",
"clusterSample"=>"",
"r2Threshold"=>"0.80",
"dataCoverageTagSnp"=>"85",
"dataCoverageClustering"=>"70",
"ldMin"=>"0.1",
"ldMax"=>"1.0",
"gFetch"=>"Display Genotypes",
"ldSelect"=>"Display Tag SNPs",
"ldCal"=>"Display Linkage Disequilibrium",
"SNPSummary"=>"Display SNP Summary"};
my $request =$ua->post(
"http://gvs.gs.washington.edu/GVS/ServletManager", Content =>\%form, Content_Type => 'form-data');
my $content=$request->content;
print $content;