Skip to content
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

Add URL parser to lua runtime #6597

Merged
merged 5 commits into from
Sep 13, 2023
Merged

Add URL parser to lua runtime #6597

merged 5 commits into from
Sep 13, 2023

Conversation

Isan-Rivkin
Copy link
Contributor

@Isan-Rivkin Isan-Rivkin commented Sep 13, 2023

Closes #6598
usage:

> local url = require("net/url")
> url.parse("https://example.com/path?p1=a#section")
{
    ["host"] = "example.com"
    ["path"] = "/path"
    ["scheme"] = "https"
    ["query"] = "p1=a"
    ["fragment"] = "section"
}

@Isan-Rivkin Isan-Rivkin added the include-changelog PR description should be included in next release changelog label Sep 13, 2023
@Isan-Rivkin Isan-Rivkin changed the title Add url parser to lua runtime Add URL parser to lua runtime Sep 13, 2023
@github-actions
Copy link

github-actions bot commented Sep 13, 2023

♻️ PR Preview 170c827 has been successfully destroyed since this PR has been closed.

🤖 By surge-preview

Copy link
Contributor

@nopcoder nopcoder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - minor comments about the doc.

@@ -420,6 +420,25 @@ The `value` string should be in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601

Returns a new 128-bit [RFC 4122 UUID](https://www.rfc-editor.org/rfc/rfc4122){: target="_blank" } in string representation.

### `net/url`

Provides a `parse` function that parses a raw url into a URL structure.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parse URL string into parts, returns a table with the URL's host, path, scheme, query and fragment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Isan-Rivkin Isan-Rivkin enabled auto-merge (squash) September 13, 2023 15:19
@Isan-Rivkin Isan-Rivkin merged commit cb5b558 into master Sep 13, 2023
33 checks passed
@Isan-Rivkin Isan-Rivkin deleted the lua/url-lib branch September 13, 2023 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
include-changelog PR description should be included in next release changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add URL parsing to lua runtime
2 participants