<div dir="ltr">Hello,<br><br>I'm trying to get the example Perl5 code from the bottom of this REST-API page to work:<br><br><a href="https://rest.ensembl.org/documentation/info/archive_id_post">https://rest.ensembl.org/documentation/info/archive_id_post</a><br><br><span style="font-family:arial,sans-serif">I can get the example curl, wget, and R code to work from the same page, so I know the server (<a href="https://rest.ensembl.org">https://rest.ensembl.org</a>) is up and running. Below is the code, cut-and-pasted. I had to install the JSON module. All I get back is the string "Failed!" while <span style="font-family:arial,sans-serif">curl, wget, and R all return actual data</span>:</span><br><div><br></div><div><br></div><span style="font-family:monospace">use strict;<br>use warnings;<br> <br>use HTTP::Tiny;<br> <br>my $http = HTTP::Tiny->new();<br> <br>my $server = '<a href="https://rest.ensembl.org">https://rest.ensembl.org</a>';<br>my $ext = '/archive/id';<br>my $response = $http->request('POST', $server.$ext, {<br>  headers => {<br>      'Content-type' => 'application/json',<br>      'Accept' => 'application/json'<br>  },<br>  content => '{ "id" : ["ENSG00000157764", "ENSG00000248378"] }'<br>});<br> <br>die "Failed!\n" unless $response->{success};<br> <br> <br>use JSON;<br>use Data::Dumper;<br>if(length $response->{content}) {<br>  my $hash = decode_json($response->{content});<br>  local $Data::Dumper::Terse = 1;<br>  local $Data::Dumper::Indent = 1;<br>  print Dumper $hash;<br>  print "\n";<br>}<br> </span><br><br><br></div>