doc: fix code examples in url.md
Checklist
-
documentation is changed or added -
commit message follows commit guidelines
Affected core subsystem(s)
doc, url
- Update outputs in code examples.
- Refine spaces in code examples.
- Restore missing part in code example (unify with other examples).
This is a retry of #13268 after #12710 landed (which has made url.md
too different doc to just resolve the conflicts). Sorry for re-bothering.