How to pass URL parameter with comma in Go
I want a URL like https://server.com/api?image_formats=jpg,webp
, but always get https://server.com/api?image_formats=jpg%2Cwebp
instead. Below is what I try but does not work:
1.Pass comma directly (try in: https://go.dev/play/p/a3PNFwP-aUV)
How to pass URL parameter with comma in Go
I want a URL like https://server.com/api?image_formats=jpg,webp
, but always get https://server.com/api?image_formats=jpg%2Cwebp
instead. Below is what I try but does not work:
1.Pass comma directly (try in: https://go.dev/play/p/a3PNFwP-aUV)
How to pass URL parameter with comma in Go
I want a URL like https://server.com/api?image_formats=jpg,webp
, but always get https://server.com/api?image_formats=jpg%2Cwebp
instead. Below is what I try but does not work:
1.Pass comma directly (try in: https://go.dev/play/p/a3PNFwP-aUV)
@ not escaped by url.PathEscape
I’m wondering why using url.PathEscape
is not escaping the “@” character.
golang @ not escaped by url.PathEscape
I’m wondering why using url.PathEscape is not escaping the “@” character