[erlang-questions] url query string encode/decode

Caragea Silviu silviu.cpp@REDACTED
Fri Dec 15 14:09:07 CET 2017

Thx Roger,

I'm using hackney_url but I did some small changes to be able to encode
proplists with nested structures. As time as you also pointed out I didn't
found any standard and also in my case I'm the one that encodes and also
the one that decodes being an internal service.

What I did is in case the value is a proplist or a list encoded it as json.
I saw this approch in some other public services as well


On Fri, Dec 15, 2017 at 1:39 PM, Roger Lipscombe <roger@REDACTED>

> On 15 December 2017 at 10:55, Caragea Silviu <silviu.cpp@REDACTED> wrote:
> > Seems parsing of lists is not compliant.
> There's no standard to be "compliant" with. Everyone pretty much
> agrees on key-value pairs where the keys are unique. Beyond that, who
> knows? I've seen ?a=1&a=2&a=3 and ?a[]=1&a[]=2&a[]=3, for instance.
> See, e.g., https://stackoverflow.com/q/24059773/8446.
> fwiw, I tend to build my URLs with hackney_url. I don't know what it
> does with repeated keys; I've never tried.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20171215/741c281b/attachment.htm>

More information about the erlang-questions mailing list