LWP-UserAgent-msgraph

 view release on metacpan or  search on metacpan

lib/LWP/UserAgent/msgraph.pm  view on Meta::CPAN

   $req->header('Content-Type' => 'application/json');
   $req->header('Accept' => 'application/json');
   $req->content(to_json($payload)) if ($payload);

   my $res=LWP::UserAgent::request($self,$req);

   #Response code is a keeper
   $self->{code}=$res->code;

   if ($res->is_success) {
      if ($res->header('content-type') =~ /^application\/json/) {
         
         my $data=from_json($res->decoded_content);

         #Here we save the nextLink for further use
         if (exists $data->{'@odata.nextLink'}) {
            $self->{nextLink}=$data->{'@odata.nextLink'};
         } else {
            $self->{nextLink}=0;
         }
         return $data;



( run in 1.437 second using v1.01-cache-2.11-cpan-d7f47b0818f )