Closed amitaibu closed 6 years ago
That seems sensible.
The other way you sometimes see this sort of thing handled is by appending a "domain" to the username supplied by the user. So, for instance, if the user supplies "rgrempel" as the username, you'd actually send "rgrempel@100" to the backend. Of course, that would require the backend to parse the username rather than looking at the query params etc., so one might or might not prefer that.
In any event, we may as well allow for query params.
BTW, I'm assuming that you need the ?site=100
only when trying to login with a username and password -- not when checking a cached access token. Let me know if that's not correct.
Yes, that's the case - only upon login with user/ pass
Merged in #12.
Currently we have https://github.com/Gizra/elm-restful/blob/d27432054b325fd9792db668b4cf74f1059c7988/src/Restful/Login.elm#L643-L647
I have a user case where I need to pass also queryParams (e.g.
?site=100
).I think we can either provide a function that will get also a
List (String, String)
(simpler); or a function that will allow chaining more commands to theHttpBuilder
-- but I suspect that the first simpler approach would already cover most of our cases.