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

Support for setting HTTP headers #314

Closed
wants to merge 1 commit into from

Conversation

tarek360
Copy link
Contributor

Some companies don't let the rive file URLs without authentication, that's why they need to send headers in the network request.

Example of how to use:

RiveAnimation.network(
          'https://cdn.rive.app/animations/vehicles.riv',
          headers: {'Authorization': '{token}'},
        )

The same idea is in the flutter_svg package

rive-engineering pushed a commit that referenced this pull request May 31, 2023
adding pr from the community #314, including an update to how we make sure credits for contributions are kept when our mono scripts merge changes upstream.

Some companies don't let the rive file URLs without authentication, that's why they need to send headers in the network request.

Example of how to use:

```
RiveAnimation.network(
          'https://cdn.rive.app/animations/vehicles.riv',
          headers: {'Authorization': '{token}'},
        )
```

The same idea is in the [flutter_svg package](https://pub.dev/documentation/flutter_svg/latest/svg/SvgPicture/SvgPicture.network.html)

Diffs=
c163c1a7f Add setting custom headers (#5327)

Co-authored-by: Ahmed Wahba <a.tarek360@gmail.com>
Co-authored-by: Maxwell Talbot <talbot.maxwell@gmail.com>
@mjtalbot
Copy link
Collaborator

this has been applied to our upstream repo and pushed down & deployed for 0.11.2. thank you for the contribution @tarek360 !

@mjtalbot mjtalbot closed this May 31, 2023
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 this pull request may close these issues.

None yet

2 participants