简体   繁体   English

Node.js解析器的链接头?

[英]Node.js parser for link headers?

I'm using the Github API, which uses Link Headers, as defined here , for pagination. 我正在使用Github API,该API使用此处定义的链接标题进行分页。

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'). 目前,我只是在使用一些字符串操作来提取“下一个” URL,但是我想知道是否为此目的使用了合适的模块(我无法在“ npm搜索”中找到任何内容)。

Thanks! 谢谢!

There's this: https://npmjs.org/package/parse-links 就是这个: https : //npmjs.org/package/parse-links

It looks a bit fragile, to my mind, but it looks like it will do very basic parsing. 在我看来,它看起来有些脆弱,但是看起来它将进行非常基本的解析。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM