Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
and I'm hitting the max amount of data REST::Client will accept. 

What do you mean? Does the module REST::Client impose a limit or does the server impose a limit?

What I understand is that either the server has paging into their API, so that you can do something like $client->GET('http://example.com/dir/file.xml?page=10&num_pages=1'); in a loop to get all the pages. OR the server has no paging to offer and you get all the data at once. In which case REST::Client has the option to save it to a file if handling it in Perl, as a variable, will cause you problems. The file can then easily be paged in the usual ways.

LWP::UserAgent allows you to provide your own callback functions to be called before and after each phase of handling the requests. But I can't see how this can be useful in your case. What I thought would be possible is to ask user-agent to give you a data-socket and do what you want with it but don't know how or if it makes sense.

Edit: How to make REST::Client save to a file from its documentation:

# request responses can be written directly to a file $client->setContentFile( "FileName" ); # or call back method $client->setContentFile( \&callback_method );

In reply to Re: Paging with REST::Client? by bliako
in thread Paging with REST::Client? by Argel

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-04-23 21:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found