google / google/jsonnet

Add std.parseUrl

Open
#630 2 comments 3 reactions 0 assignees View on GitHub
enhancement stdlib
Dominant language
Jsonnet
Stars
7.6k
Forks
475
PR merge metrics
No merged PRs in 30d

Description

Having a `std.parseUrl(str)` that returns a JSON object with "scheme", "host", "path", "query" and "fragment" fields would be useful for generating configurations where some applications accept parts of the URL as individual fields.

I suppose "host" could be more complicated, e.g. it may be useful to have "host" and "port" separated out, it may be useful to have "hostport" as a single string, have "port" always populated with the default for the "scheme", etc.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.