doc, url: various improvements to WHATWG API#11330
doc, url: various improvements to WHATWG API#11330TimothyGu wants to merge 5 commits intonodejs:masterfrom
Conversation
doc/api/url.md
Outdated
There was a problem hiding this comment.
Probably "as percent-encoded strings" or "as a string of percent-encoded characters", or even "percent-encoded bytes"? "a percent-encoded string" sounds a bit weird given that they would be not just be encoded but also joined with & and =s.
Another way to explain it would be to mention that it is somewhat similar to querystring.stringify().
There was a problem hiding this comment.
How about:
-Returns the search parameters serialized as a URL-encoded string.
+Returns the search parameters serialized as a string, with characters
+percent-encoded where necessary.
doc/api/url.md
Outdated
There was a problem hiding this comment.
nit: "does not allow users to customize the.." seems easier to read?
doc/api/url.md
Outdated
There was a problem hiding this comment.
nit: "Below it"?(as opposed to "Above it")
doc/api/url.md
Outdated
There was a problem hiding this comment.
I know it's already there but technically, doesn't url.parse() percent-decode things..?
There was a problem hiding this comment.
url.parse() also encodes certain things:
> url.parse('http://\n.com').pathname
'%0A.com'7a14576 to
424ec4f
Compare
PR-URL: #11330 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Also remove executable bit from doc/api/url.md's mode. Backport-of: nodejs#11330 Fixes: 84e2ff3 "doc: add basic documentation for WHATWG URL API"
Also remove executable bit from doc/api/url.md's mode. Backport-of: nodejs#11330 Fixes: 84e2ff3 "doc: add basic documentation for WHATWG URL API"
Checklist
Affected core subsystem(s)
doc, url