-
Notifications
You must be signed in to change notification settings - Fork 39
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
Allow send additional data via meta key #56
Conversation
Codecov Report
@@ Coverage Diff @@
## master #56 +/- ##
==========================================
- Coverage 71.13% 70.47% -0.66%
==========================================
Files 6 6
Lines 97 105 +8
Branches 20 21 +1
==========================================
+ Hits 69 74 +5
Misses 28 28
- Partials 0 3 +3
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍
I am kind of thorn between this would be nice to have and it is a good thing to have the restriction. If we want to support more complex data structures I think urlencoded json is a good way to go. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, let's ship this for now and then discuss about more complex stuff in an issue?
Honestly I don't think that
I think that POST is correct way for passing meta. fetch('/users', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
meta: {…},
})
}) And I prefer to decide how it will be before shipping something for users. |
I agree, I am thinking that it would be great if we turned it so that get only reads and post is the way to put things into the db. |
If we split get and put it would be major release, so for now we can merge this PR and release it as minor version. After this I can start splitting. |
I'm not a fan of that, I quite like that window.onload = () => {
fetch(`my-analytics.com/${window.location.href}`)
.then(data => console.log(`${data.views} views`))
} I do agree that |
👍 |
Closing this as we want to revisit without meta in GET requests. The meta-branch contains a wip version of that on top of the lerna restructure. |
@relekang @mxstbr
It should resolve #24
But I think that opportunity to pass something more complicated than strings will be cool. How we should pass arrays or objects?