net: introduce path formatting function Introduce a function to format the path and query string for a URL, suitable for creating an HTTP request.