-
Notifications
You must be signed in to change notification settings - Fork 56
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
create function to manually add cookies #76
Comments
Hi, I think it would be better like that too. As I have integrated cookie handling with I'll add this feature right away! |
@sehnryr appreciate the speed on this one. i tried it out and had some difficulties. after tinkering for a minute i found that i need to still call a different Requests function String serviceUrl = 'www.domain.com'
await Requests.addCookie(Requests.getHostname(serviceUrl), name, value); as opposed to: String serviceUrl = 'www.domain.com'
await Requests.addCookie(serviceUrl, name, value); obviously calling getHostname(serviceUrl) works, but was this intended? do you think there could be value in having both one that takes a url as a human readable string and allows Requests to call getHostname() internally in addition to what you have already added? |
@xxorathaa To be honest with you, I just thought of making it similar to the other methods. But now that you mention it, I think it would be better if the other methods could also take the url instead of the hostname. |
cool, will keep my eyes on the changelog! i'm in no rush for it considering we have a way to make it work already, but i appreciate your getting back to me and the attention your giving to this issue. |
@xxorathaa I've opened #78, do you think there should be more to add? |
personally, i would add new methods vs changing the original ones. if you
were to add new ones woth the same name but String url in the signature,
the new functions can accomplish the gethostname() functionality then call
the original ones. this allows additional functionality, both types of
usability, and no breaking changes.
but thats just my two cents, and im not sure how much complexity adding the
new functions would add to the maintainability of the repo.
…On Sun, Jun 19, 2022, 4:19 PM Youn Mélois ***@***.***> wrote:
@xxorathaa <https://github.com/xxorathaa> I've opened #78
<#78>, do you think there should
be more to add?
—
Reply to this email directly, view it on GitHub
<#76 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKUOYWVYDCFWXLI25SAWQW3VP6FEJANCNFSM5Y7U63CA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
in the past we could add cookies via:
now the working solution is more complex:
if instead Requests exposed a function to add cookies this could be simplified to something like:
Requests.addCookie(String url, String name, dynamic value);
in this way we would not have any need to expose the cookies.dart file as well as having a clean handling of cookies.
The text was updated successfully, but these errors were encountered: