nicolasff / webdis

A Redis HTTP interface with JSON output
https://webd.is
BSD 2-Clause "Simplified" License
2.82k stars 305 forks source link

How to escape "/" in string #79

Closed razb closed 10 years ago

razb commented 10 years ago

I am trying to push message strings with embedded dates to a list via webdis:

curl -d "RPUSH/mylist/{test 1 on 08/29/2013}" http://127.0.0.1:7379/ {"RPUSH":3}

Which results in:

redis 127.0.0.1:6379> lrange mylist 0 2 1) "test 1 on 08" 2) "29" 3) "2013"

Any suggestions? I've tried the obvious choices such as escaping with "\"

nicolasff commented 10 years ago

Hi,

You can escape / with %2F, e.g. curl -d "RPUSH/mylist/{test 1 on 08%2F29%2F2013}" http://127.0.0.1:7379/.

Cheers, Nicolas

razb commented 10 years ago

Works perfectly. Thanks