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

WIP: url stlib module for parsing url struct #2200

Closed
wants to merge 5 commits into from

Conversation

0xquark
Copy link
Contributor

@0xquark 0xquark commented Jan 29, 2023

Pull request

Description

This pull request includes new functionality for working with URLs in the Tremor.
The following functions have been added:

  • url::construct: This function allows for the construction of a URL from its individual components, such as scheme, host, path, query, and fragment.

  • url::set_scheme: This function allows for the changing of the scheme of a given URL.

  • url::set_host: This function allows for the changing of the host of a given URL.

  • url::set_path: This function allows for the changing of the path of a given URL.

  • url::set_query: This function allows for the changing of the query of a given URL.

  • url::set_fragment: This function allows for the changing of the fragment of a given URL.

These functions are implemented using the url crate. I've attached tests but i am not able to properly verify.

Related

Checklist

  • The RFC, if required, has been submitted and approved
  • Any user-facing impact of the changes is reflected in docs.tremor.rs
  • The code is tested
  • Use of unsafe code is reasoned about in a comment
  • Update CHANGELOG.md appropriately, recording any changes, bug fixes, or other observable changes in behavior
  • The performance impact of the change is measured (see below)

Performance

@Licenser
Copy link
Member

Heya nice! that was super quick

A few suggestions:

  • it'd be nice to have a deconstruct or parse function that returns a struct with fields like
{
 "scheme": "https",
 "path": "/path",
...
  • I love the set_* functions! I didn't even think of that but it's sure very helpful :) it would be nice to have the opposite get_*
  • it'd be nice to have the option to construct as well as parse, that takes the struct and creates a string (watch out for urlencoding ;) )
  • the set_query / construct function would be nice to have the option to take a map as well as a string for the query to build a query string from it :)

@0xquark 0xquark changed the title url stlib module for parsing url struct WIP: url stlib module for parsing url struct Jan 29, 2023
@Licenser
Copy link
Member

@0xquark are you still working on this?

@0xquark
Copy link
Contributor Author

0xquark commented Apr 16, 2024

Hi @Licenser! I'm swamped right now with my work, so I couldn't move forward with this PR.
Could you please assign another person to handle it?
Apologies and Thanks!

@Licenser
Copy link
Member

Closing this as there is no time to finish the PR

@Licenser Licenser closed this Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

url stdlib module
2 participants