Please post your python code. I got the perl code working, found the link, parsed and got the next link. But I'm considering switching to python anyway, and I want to see the logic of how to check for the end.
It's really awkward, the way I stop is if the next is the same as the current link then you are done, but since they don't publish a decent example, it's difficult to know whether that is the correct logic or whether there is some weird case that would create problems.
I haven't done REST programming, but this seems like really poor design, and worse documentation. If you are providing a REST API for something that is too big to do in a single go, then surely you return JSON that has the link, or a boolean flag with whether to continue or not. To store it in the header, force me to parse it out, and to check some condition to know whether there is more?
And the idea that if you send a malformed URL, instead of getting back JSON with an error code, you get a huge HTML file is also pretty bizarre.
So instructure should clean up their mess, and yes, I would really appreciate an example, in any language.