Closed n1k0 closed 6 years ago
Same with sub-paths:
$ echo '[]' | http POST https://www.jsonstore.io/64892bfe3d5286885ae7cc8808d1a21b60e98c51b4cdfacd225efff5b3218241/foo
HTTP/1.1 201 Created
{
"ok": true
}
$ http https://www.jsonstore.io/64892bfe3d5286885ae7cc8808d1a21b60e98c51b4cdfacd225efff5b3218241/foo
HTTP/1.1 200 OK
{
"ok": true,
"result": null
}
$ echo '[1]' | http POST https://www.jsonstore.io/64892bfe3d5286885ae7cc8808d1a21b60e98c51b4cdfacd225efff5b3218241/foo
HTTP/1.1 201 Created
{
"ok": true
}
$ http https://www.jsonstore.io/64892bfe3d5286885ae7cc8808d1a21b60e98c51b4cdfacd225efff5b3218241/foo
HTTP/1.1 200 OK
{
"ok": true,
"result": [
1
]
}
Okay I'm just relaized I'm not using the API the way it's supposed to be, as it's really path-based.
Posting as suggested in the docs works fine, eg. postting "a"
to /users/1
and "b"
to users/2
lists "a"
and "b"
at /users
.
Sorry for the noise, I should probably take more time ensuring to actually read docs.
Hey @n1k0,
Everything is fine, glad you've figured it out. :) If you have any other questions/suggestions, please don't hesitate to create another issue.
Also, if you think that some of the details are unclear in the readme/website, please raise a flag.
Thank you!
Actually yeah I'm struggling with the very aggressive caching poliy on jsonstore.io, which doesn't really help testing. I'm facing data being not rendered for several seconds/minutes while the resquest issued a 201 response just fine.
I'm not sure I should file an issue about that as I totally understand you don't want your free public server to be hammered with tests and abuse, though in my case that quite defeats the purpose of using a third party storage solution, which I picked for convenience not having to host anything haha
This could be a bug, our caching mechanism should be transparent, if you can't query most recent data it's not an expected behavior.
I'll have a look soon and will let you know.
Hey @n1k0, that was indeed a bug in on our side, it should be fixed now.
Posting something else seems to work fine:
Including non-empty arrays:
Is it a bug? If it's not, where can I find documented limitations for this API?
Thanks.