Skip to content

Access Link header in fetch response #92

Open
@mikeheft

Description

@mikeheft

I'm consuming an API that I paginated with your gem. How would I gain access to the link header in the fetch response? I am using React to consume the endpoint, right now when I try response.headers it's just an empty json object.

    fetch('url')
      .then(response => {
        return response.json()})
      .then(data => {
        this.setState({recomms: data})
        localStorage.setItem('movies', JSON.stringify(data))
       })

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions