Skip to content

bloblang method to URL encode string #1615

Answered by mihaitodor
gramian asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @gramian. I think the name of escape_url_query might be a bit misleading, but the docs do state that it "Escapes a string so that it can be safely placed within a URL query". Under the hood, it simply calls url.QueryEscape, which, as far as I can tell, performs the percent encoding that you're looking for. I tested some examples from Mozilla's encodeURI() docs quickly via benthos blobl server and got the same results.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@gramian
Comment options

@mihaitodor
Comment options

Answer selected by gramian
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants