-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
How to get/set query string parameters? #37
Comments
It's simply not implemented yet in this library :). After we go through all the changes in #36, it will probably follow soon after. The terminology is likely historical. Maybe @annevk knows why browsers originally chose those terms instead of the RFC ones. That RFC is certainly dated way after browsers implemented the Regardless, that RFC is obsolete, and you should follow the URL Standard's terminology. (Although even that doesn't match the public API, again presumably for historical reasons.) |
Thanks @domenic. |
I don't really know the history behind the terms, but it seemed wrong to deviate from the terms already established in JavaScript APIs in new APIs. |
Okay, makes sense. |
How will PHP-like queries be handled?:
|
@stevenvachon See the API here. Your first example would be a bit weird since you'd have to do |
Thanks! |
Any progress on this? |
As you can see from the lack of commits related to it, no. |
Private progress does exist in general. Why is there no interest in implementing |
@stevenvachon I'm using js-polyfills. |
@glen-84 thank you, but unfortunately, I need an implementation of const URL = eval("(function(self){"+ require("fs").readFileSync(__dirname+"/../node_modules/js-polyfills/url.js","utf8") +"; return self}({}))").URL; // sigh but it tries to use |
@stevenvachon did you ever find a working polyfill? Node v7 now has native support for the URL api with |
@mmcgahan nope 😞. I use Node v7's |
We are really going to need |
Adding +1s or their equivalent is not really helpful. A pull request would be appreciated instead. |
Can we just use https://www.npmjs.com/package/url-search-params as a dependency? |
@felixfbecker it's not spec-compliant. They didn't know that a spec existed: WebReflection/url-search-params#19 |
Well the implementation implements 99% of it, if I went ahead and did my best to file a "reasonable bug" so we can move on with this: WebReflection/url-search-params#22 😉 |
I don't intend to take on a dependency on a module maintained by someone with that attitude toward spec compliance. It'll be better implemented in webidl2js anyway (e.g. USVString conversions). |
@felixfbecker I don't think it's 99% compliant. It uses |
Fair enough. |
@TimothyGu do you still have an interest in doing this? You're the biggest expert on implementing it. |
|
As stated above, we have no intention of using that library. |
I'd still like to get support for sequence and unions (both used by |
PoC: #87 |
Has
URLUtils.searchParams
been removed?What is the best way to do this?
Unrelated: Why doesn't URL use the same terminology as RFC3986? (protocol -> scheme, hash -> fragment, search -> query, etc.)
The text was updated successfully, but these errors were encountered: