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

Ensure options are passed to fetch() #83

Merged
merged 1 commit into from
Aug 28, 2017

Conversation

jtm240
Copy link
Contributor

@jtm240 jtm240 commented Aug 26, 2017

This PR fixes an issue where arguments are not being passed to fetch().

The project Readme states that it is possible to provide arguments to realtime(), but only the URL is being passed to fetch(). It is necessary to be able to supply arguments to fetch so that authentication (e.g. cookies) can be used when making calls to an endpoint that requires a valid user session.

If I've overlooked something, please let me know!

@perliedman perliedman merged commit 16e8f2a into perliedman:master Aug 28, 2017
@perliedman
Copy link
Owner

Woops, nice catch! Thanks! 👍

@marianomd
Copy link

Dist folder still has old version where options aren't passed to fetch.

@brittanecrow
Copy link

Could someone provide an example of how to attach an authorization token header? I have not been able to achieve it. Here is what I am trying:

this.mapRealtime = L.realtime({
url: this.getRealtimeUrl(),
crossOrigin: true,
headers: {'authorization': 'token'},
type: 'json',
}, {

the authorization shows up but it appears the token is not being attached. Thank you!

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

4 participants