Multiple requests in one cassette (pagination?) #940
-
I wrote a function that performs a first API request and if there is a "NextPage" within the answer body, the function will go into a loop of getting the next pages. In those loop requests I need to add the NextPage to the api url. My function concatenates all results into one big tibble. Vcr records that first API call and ignores the ones in the loop. I think this is some kind of pagination behavior (I am very new to API programming) and I thought there might be a solution to record all requests and answers. Maybe I am missing just the keywords to search for a vcr configuration, a solution or the missing piece that makes this feature somewhat impossible or irrelevant? I thought about splitting the function into the initial function, the loop and the assembly but I guess that wouldn't help as it is still several requests. I could try to change the API as well, but also don't know how to change in a way that would make this work. I'd be glad for any hints, reading, or clarification on that topic! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Sorry, for the question, I managed to get it to run. I don't know what I changed, but at some point the cassette was recorded properly including all "pages". |
Beta Was this translation helpful? Give feedback.
Sorry, for the question, I managed to get it to run. I don't know what I changed, but at some point the cassette was recorded properly including all "pages".