Skip to content

Allow passing authentication headers when loading URLs #130

@adamhooper

Description

@adamhooper

I'm building ... well ... a data hub. Some clients will publish private Frictionless datasets, and they'll want tools to read them.

I see no docs on frictionlessdata.io concerning this pattern. So as a brainstorm idea, perhaps let the user define an HTTP transport:

const data = require('frictionless.js')

async function customFetch(options) {
    return http.request({ ...options, headers: { 'Authentication': 'Basic abcdef' } })
}

const pathOrDescriptor = 'https://paid-service.com/all-my-secrets/datapackage.json'
const dataset = await data.Dataset.load(pathOrDescriptor, { customFetch })

Prior work: Here are some approaches for supporting a zillion HTTP servers:

As a user, I find the Relay approach the most intuitive.

(These clients are all browser-native, so the use cases are a bit different.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions