Skip to content

Add URL Encoder class #61

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

Merged
merged 2 commits into from
Apr 9, 2019
Merged

Add URL Encoder class #61

merged 2 commits into from
Apr 9, 2019

Conversation

sandeepmistry
Copy link

As discussed with @tigoe, is this what you had in mind or do you prefer a C style API without the class? (Something like urlencode(input))

@tigoe
Copy link

tigoe commented Apr 9, 2019

Good question, I can see the sense of a class, in fact I could even see how it might belong in Stream, because other libs might need it too. So I guess a class might make sense as it'd be easier to port it?

@sandeepmistry
Copy link
Author

Yes, let's go with class, right now it's the same syntax as Java: https://docs.oracle.com/javase/7/docs/api/java/net/URLEncoder.html

String URLEncoder.encode(String s)

@cmaglie had one suggestion to make the functions static, which I will push soon.

@tigoe
Copy link

tigoe commented Apr 9, 2019

Good idea, @cmaglie, I agree.

@sandeepmistry sandeepmistry merged commit 5f56703 into master Apr 9, 2019
@sandeepmistry sandeepmistry deleted the url-encoder branch April 9, 2019 16:44
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.

2 participants