my $client = REST::Client->new(); $client->addHeader('Authorization', 'Basic YWRtaW46cmFyaXRhbg=='); $client->addHeader('content_type', 'application/json'); $client->addHeader('accept', 'application/json'); $client->setHost('https://host'); $client->setTimeout(1000); $req = '/api/v2/devices?name_eq=193456'; $client->request('GET', qq($req)); $data1 = from_json($client->responseContent());