Ask Your Question
1

Pagination in HTTP Client

asked 2017-10-04 01:24:59 -0500

sujeet gravatar image

updated 2017-10-04 14:33:02 -0500

metadaddy gravatar image

I was using http client for facebook data extraction but am not getting next page data as have to use pagination. when i was using pagination it gives me error like "list required but got string". How to fix pagination for this?

edit retag flag offensive close merge delete

Comments

Can you give an example of the response data?

metadaddy gravatar imagemetadaddy ( 2017-10-04 14:32:42 -0500 )edit

data:(Map) "id"(String):"xxxxxxxxx" "message"(String):"vvvvvvvv" pagination: "next":"xxxxxxxx" "before":"nnnnnnn" Here data is a map type .Inside pagination "next " is the parameter which contains the url of the next page. But as pagination requires List or map not string.

Maithri gravatar imageMaithri ( 2017-10-17 01:22:08 -0500 )edit

How can i make this string to a list to achieve pagination using http client

Maithri gravatar imageMaithri ( 2017-10-17 01:22:33 -0500 )edit

Hi sujeet, If your using API would suggest using custom script connectors in SS like (jython,JS,groovy) has the best option for developing API source (my personal choice) and keep in mind that social API data is always huge and SDC memory consumption may go high.

strem_dev gravatar imagestrem_dev ( 2020-03-03 15:43:30 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2020-07-29 09:11:23 -0500

Jorge Arévalo gravatar image

I have a similar situation, I think. My response is a map with several fields, and one of them, called offset, contains the url to next page. This is the configuration that works for me in the HTTP Client box (the useful payload in my case is in a field named records, but that's not important)

image description

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-10-04 01:24:59 -0500

Seen: 722 times

Last updated: Jul 29