Hello Team, I was trying to capture the "Link" value contains string "next" in order to do the pagination but i was unable to do the same as i was collecting from header-as-string from LWP request. How i can collect the "Link" value that contains "next"?
Please check my header contents as print value
Cache-Control: no-cache, no-store Connection: close Date: Fri, 26 Mar 2021 02:11:16 GMT Pragma: no-cache Server: nginx Vary: Accept-Encoding Content-Type: application/json Expires: 0 Client-Date: Fri, 26 Mar 2021 02:11:16 GMT Client-Peer: 10.10.1.32:8080 Client-Response-Num: 1 Client-Transfer-Encoding: chunked Expect-Ct: report-uri="https://org.extract.net", max-age=0 Link: <https://sso.myorg.com/api/v5/myids?limit=200>; rel="self" Link: <https://sso.myorg.com/api/v5/myids?after=200xxxxxxxxxxxxxxxxx&l +imit=200>; rel="next"
my code portion
use LWP; use LWP::UserAgent; $response1 = $response->headers_as_string; print "$response1\n";
Please check below portion that is blank
$linkheader = $response1=~m/Link/; print "$linkheader\n";
How i can collect the Link values from the data above?
In reply to Perl to collect "Link" values contains "next" by chandantul
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |