remy / jsonbin

A personal JSON store as a RESTful service
https://jsonbin.org
395 stars 26 forks source link

Creating data on a path with a period `.` doesn't explode properly #61

Open remy opened 1 year ago

remy commented 1 year ago
curl -i -X POST https://jsonbin.org/remy/blog.v2 \
     -H "authorization: token $TOKEN" -d '{ url: "https://remysharp.com" }' \
     -H 'content-type: application/json'
HTTP/2 201

But this makes:

{
  "blog.v2": {}
}

When it should make:

{
    "blog": {
        "v2": {
            "url": "…"
        }
    }
}

Also prevents delete etc because the path is hosed.