Node.js parser for link headers?

1.6k Views Asked by At

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 find anything in 'npm search').

Thanks!

1

There are 1 best solutions below

0
wombleton On BEST ANSWER

There's this: https://npmjs.org/package/parse-links

It looks a bit fragile, to my mind, but it looks like it will do very basic parsing.