Skip to content

Custom headers when streaming #22

@AndreasLymalmMTM

Description

@AndreasLymalmMTM

Request

When streaming a publication, use any custom headers when making HTTP requests.

Use Example

We could e.g. use a Map<String, String> when opening a publication. Headers could be different for different publications or the publications could come from different servers, so entering the headers on this level makes sense:

await _flutterReadium.openPublication(
    publicationUrl,
    headers: {
      'Authorization': 'Bearer $accessToken',
    },
);

What to Think About

  • In Kotlin
    • AssetRetriever should take a custom DefaultHttpClient.
    • ExoPlayer also makes HTTP requests, check how to add the headers there.
    • Somthing else?

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