Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple links for the same link relation do not work. #11

Open
fidian opened this issue Jul 25, 2016 · 6 comments
Open

Multiple links for the same link relation do not work. #11

fidian opened this issue Jul 25, 2016 · 6 comments

Comments

@fidian
Copy link

fidian commented Jul 25, 2016

For example, let's use a collection with multiple items.

Link: <http://example.com/list/one>, rel="item"; <http://example.com/list/two>, rel="item"

When parsed, I only see the /list/two link. The first one appears to be consumed.

I would expect an object like this:

{
    "item": [
        {
            "href": "http://example.com/list/one",
            "rel": "item"
        },
        {
            "href": "http://example.com/list/one",
            "rel": "item"
        }
    ]
}
@juanmendes
Copy link

I think it's very important that multiple elements with the same rel are supported. A common use case is for a call to show "down" links into sub resources you have access to.

@thlorenz
Copy link
Owner

thlorenz commented Mar 15, 2017

@juanmendes if you want you could review the PR #12 that @fidian provided and get it merged. If so LMK and I'll make you a collaborator.
@fidian didn't want to pick up the slack here and refused to do so. However as I explained I don't have bandwidth to manage all my projects personally and need help getting things merged which is why that PR never made it in.

@opeologist
Copy link

there are now 4 total contributors of this repo and this issue is still something that hugely effects the usage of this package with more complex headers. can that PR please be merged in asap so i can use this package? it fits my usecase perfectly, except that it doesn't create an array when multiple items when it needs to/should.

@thlorenz
Copy link
Owner

@tehOPEologist if you read the PR in question closely, you'll realize that there is a good reason it didn't get merged. I don't have the bandwidth to review it closely and seems like none of the other contributors did.
Keep in mind this is our free time we're donating to get this in.

If you want to help take that PR as a basis and provide a cleaned up version of it to speed up the review required.
Thanks 🙏

@ali-habibzadeh
Copy link

It's been 4 years. I am guessing no one is maintaining this anymore?

@melroyvandenberg
Copy link

melroyvandenberg commented Apr 12, 2024

8 years now.. I think I need to move on to another project like: https://github.com/jhermsmeier/node-http-link-header

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants