src/resource/Resource.js
/**
   * Async request that parses the link header if any.
   *
   * @param {Settings} requestOptions - Mandatory request options
   * @param {Boolean} fullResponse - Wrap Response or not
   * @param {Settings} [userOptions] - Optional user options
   * @returns {Promise.<{result: Response|Array, next: string}>}
   * @private
   */
Async request that parses the link header if any.
Async request that parses the link header if any .
async _linkRequest (requestOptions, fullResponse, userOptions = {}) {
    const opts = Object.assign({ fullResponse: true }, requestOptions)
    const response = await this._request(opts, userOptions)
    const linkHeader = parseLinkHeader(response.headers.get('link'))
    const next = linkHeader.next && decodeURIComponent(linkHeader.next)
    const result = await (fullResponse ? response : response.json())
    return { result, next }
  }
async _linkRequest ( requestOptions , fullResponse , userOptions = { } ) { const opts = Object . assign ( { fullResponse : true } , requestOptions ) const response = await this . _request ( opts , userOptions ) const linkHeader = parseLinkHeader ( response . headers . get ( 'link' ) ) const next = linkHeader . next && decodeURIComponent ( linkHeader . next ) const result = await ( fullResponse ? response : response . json ( ) ) return { result , next } }
Async request that parses the link header if any.
Async request that parses the link header if any .