Questions tagged [link-header]

6 questions
4
votes
1 answer

Node.js parser for link headers?

I'm using the Github API, which uses Link Headers, as defined here, for pagination. Currently I'm just extracting 'next' URLs using some string manipulation but I was wondering if there was a proper module for this purpose (I haven't been able to…
mikemaccana
  • 110,530
  • 99
  • 389
  • 494
2
votes
2 answers

WebPack Imported module is not defined

I am trying to read the link header using parse-link-header in an Angular component. In my component I have: import * as parseLinkHeader from "parse-link-header"; searchLinks: parseLinkHeader.Links; and in…
MEF
  • 122
  • 2
  • 9
1
vote
2 answers

Question mark in value of @InjectLink is encoded as %3F. How to prevent this?

I use Jersey's Link Headers feature to create HTTP link headers: @InjectLink(value="users/?orgId=12345&page=0",rel="first") Works well except question mark - this is encoded in %3F and resulting URL looks like: …
0
votes
1 answer

How to generate HATEOAS links for paging in ASP.NET Core 6 Web API controller to return in Link header?

I need to create HATEOAS pagination links for first, last, next, and previous and add them to the Link header of the response. A PagedResultDTO is returned from the application layer to the controller in the API layer. Besids the records it holds…
M. Koch
  • 525
  • 4
  • 20
0
votes
1 answer

What is best way to pass pagination info to RestController?

Almost each major cloud storage service provider like Google, Box, OneDrive use request parameters to convey pagination info to web services and update response object to further communicate next page info to the client. Despite of having standard…
chetan choulwar
  • 305
  • 1
  • 14
0
votes
1 answer

Correct approach to getting all pages from API that utilizes a Link header (using JavaScript/NodeJS)

I'm using a NodeJS module called node-github, which is a wrapper around the Github API, to get some statistics about certain users, such as their followers: var getFollowers = function(user, callback) { github.user.getFollowers(user, function(err,…
Traveling Tech Guy
  • 27,194
  • 23
  • 111
  • 159