Title: Link header pagination only parsing first rel · Issue #5257 · PowerShell/PowerShell · GitHub
Open Graph Title: Link header pagination only parsing first rel · Issue #5257 · PowerShell/PowerShell
X Title: Link header pagination only parsing first rel · Issue #5257 · PowerShell/PowerShell
Description: Steps to reproduce $uri_base = 'https://MYDEVORG.okta.com' $apikey = 'MYAPIKEY' $uri = $uri_base + '/api/v1/users/?filter=status eq "STAGED"&limit=200' $method = 'GET' $headers = @{'Accept'='application/json';'Content-Type'='application/...
Open Graph Description: Steps to reproduce $uri_base = 'https://MYDEVORG.okta.com' $apikey = 'MYAPIKEY' $uri = $uri_base + '/api/v1/users/?filter=status eq "STAGED"&limit=200' $method = 'GET' $headers = @{'Accept'='applic...
X Description: Steps to reproduce $uri_base = 'https://MYDEVORG.okta.com' $apikey = 'MYAPIKEY' $uri = $uri_base + '/api/v1/users/?filter=status eq "STAGED"&limit=200' $method...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/5257
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Link header pagination only parsing first rel","articleBody":"Steps to reproduce\r\n------------------\r\n\r\n```pwsh\r\n$uri_base = 'https://MYDEVORG.okta.com'\r\n$apikey = 'MYAPIKEY'\r\n$uri = $uri_base + '/api/v1/users/?filter=status eq \"STAGED\"\u0026limit=200'\r\n$method = 'GET'\r\n$headers = @{'Accept'='application/json';'Content-Type'='application/json';'Authorization'=\"SSWS $apikey\"}\r\n\r\nPS /\u003e $json = Invoke-RestMethod -Uri $uri -Method $method -Headers $headers -FollowRelLink\r\nPS /\u003e $json.Count\r\n200\r\nPS /\u003e $webreq= Invoke-WebRequest -Uri $uri -Method $method -Headers $headers\r\nPS /\u003e $webreq.RelationLink\r\n\r\nKey Value\r\n--- -----\r\nself https://MYDEVORG.okta.com/api/v1/users?limit=200\u0026filter=status+eq+%22STAGED%22\r\n\r\n\r\nPS /\u003e $webreq.Headers.Link\r\n\u003chttps://MYDEVORG.okta.com/api/v1/users?limit=200\u0026filter=status+eq+%22STAGED%22\u003e; rel=\"self\"\r\n\u003chttps://MYDEVORG.okta.com/api/v1/users?after=OKTAUSERID\u0026limit=200\u0026filter=status+eq+%22STAGED%22\u003e; rel=\"next\"\r\nPS /\u003e\r\n```\r\n\r\nExpected behavior\r\n-----------------\r\n\r\nInvoke-RestMethod should follow the next rel link and return additional results.\r\nInvoke-WebRequest RelationLink dictionary should contain both \"self\" and \"next\".\r\n\r\nActual behavior\r\n---------------\r\n\r\nOnly the first value from $webreq.Headers.Link is parsed into RelationLink.\r\n\r\nEnvironment data\r\n----------------\r\n\r\n```\r\nlsb_release -a\r\nNo LSB modules are available.\r\nDistributor ID: Ubuntu\r\nDescription: Ubuntu 16.04.3 LTS\r\nRelease: 16.04\r\nCodename: xenial\r\n```\r\n\r\n```pwsh\r\n\u003e $PSVersionTable\r\n\r\nName Value\r\n---- -----\r\nPSVersion 6.0.0-beta.9\r\nPSEdition Core\r\nGitCommitId v6.0.0-beta.9\r\nOS Linux 4.4.0-43-Microsoft #1-Microsoft Wed Dec 31 14:42:53 PST 2014\r\nPlatform Unix\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}\r\nPSRemotingProtocolVersion 2.3\r\nSerializationVersion 1.1.0.1\r\nWSManStackVersion 3.0\r\n```\r\n\r\nReferences\r\n----------------\r\n\r\nRelated commit: https://github.com/PowerShell/PowerShell/commit/40446c80a705f71260a9258ebc6477982789e82e\r\nRelated RFC: https://github.com/PowerShell/PowerShell-RFC/blob/master/2-Draft-Accepted/RFC0021-Link-header-based-pagination-for-WebCmdlets.md","author":{"url":"https://github.com/dddugan","@type":"Person","name":"dddugan"},"datePublished":"2017-10-27T15:34:16.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/5257/PowerShell/issues/5257"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5e694279-c279-a5c4-0bbb-23181bdc33b2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C09C:1D99C8:214ECA:2E6A97:6A5862E7 |
| html-safe-nonce | b0ddbfa84cae59edff3539a194550c5c31ce830dc187d2999819d30d2d8eb8ac |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMDlDOjFEOTlDODoyMTRFQ0E6MkU2QTk3OjZBNTg2MkU3IiwidmlzaXRvcl9pZCI6IjQ1MTQ5NTgyODQzNDkyNjg3MTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e0ed71b2fc1a9d115224023d562f1a58895e48afeb6608d06169a66eaf5321ee |
| hovercard-subject-tag | issue:269148005 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/5257/issue_layout |
| twitter:image | https://opengraph.githubassets.com/dd9f5864b2e46e62a3a13ac244a57614b26503fc41f5ddaeb3b5e68c74104140/PowerShell/PowerShell/issues/5257 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/dd9f5864b2e46e62a3a13ac244a57614b26503fc41f5ddaeb3b5e68c74104140/PowerShell/PowerShell/issues/5257 |
| og:image:alt | Steps to reproduce $uri_base = 'https://MYDEVORG.okta.com' $apikey = 'MYAPIKEY' $uri = $uri_base + '/api/v1/users/?filter=status eq "STAGED"&limit=200' $method = 'GET' $headers = @{'Accept'='applic... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dddugan |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f2a0c7865178af3d91dd9f13b0cdfc3c73a2529c873d2780bb4c01271a57ec6 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8aae7b8d6caacacf5c66eaeb2702d8dc88d85b4a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width