Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^5: Paging with REST::Client?

by 1nickt (Canon)
on Jan 13, 2020 at 17:54 UTC ( [id://11111367]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Paging with REST::Client?
in thread Paging with REST::Client?

Umm, right. Rest::Client does not do any paging. You said that it's on the server. So that means that you will have to provide the parameters or headers necessary to Rest::Client in the call it makes, and write a wrapper that collates the results from the various requests.

What does the documentation of the API you are calling say about paging?


The way forward always starts with a minimal test.

Replies are listed 'Best First'.
Re^6: Paging with REST::Client?
by Argel (Prior) on Jan 13, 2020 at 19:31 UTC
    The only documentation is an example in an appendix. I've used it with with Perl code shelling out to Curl, so I can go back to it if necessary. But that was really ugly code and I don't have time to write something prettier. I was really hoping this came up enough that an existing module supported it, or e.g. that LWP::UserAgent had the hooks in it to add support for it. Sort of like how XML::Twig has an option to iterate over large XML files.

    It seems like the easiest approach may be to see if I can tell that there was an error because of too much data, and if so, I can assume a restart is needed. Thanks for the help!

    Elda Taluta; Sarks Sark; Ark Arks
    My deviantART gallery

      The only documentation is an example in an appendix.

      Where can one read that documentation?

      I was really hoping this came up enough that an existing module supported it, or e.g. that LWP::UserAgent had the hooks in it to add support for it.

      Sorry but you still haven't explained the problem, what are you talking about?

      "Paging" is just looping. https://metacpan.org/release/REST-Client/source/lib/REST/Client.pm is a thin wrapper around LWP, and LWP has plenty of hooks.

      Its like a delivery driver asking a car mechanic, does my car have paging? Can you add a paging module?

      Dear delivery driver, you are the pager :) You drive for pickup, you drive for delivery, repeat, ...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11111367]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2024-04-18 12:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found