Closed ttscoff closed 10 years ago
Hi thanks a lot for the bug report!
No the ID is correct, there is an example of a valid ID in the API. I don't see any problems in using spaces in the ID as separator for name spaces.
The behavior of the short url's seems to be broken in general: I have refactored the core today. I'll look into this immediately.
When retrieving a note where the id has spaces, how should the id in the query be formatted? Percent encoded?
The ID returned for a note was 2014 1 19 this-is-a-test-26
. This doesn't work, though:
curl 'http://www.notehub.org/api/note/?noteID=2014%201%2019%20this-is-a-test-26&version=1.1'
That gives me "Nothing Found" as an HTML page.
The short-urls should work now for new notes created through API.
Did this also fix the last question I had above regarding ids in queries?
Sorry, in the flood of messages yesterday I didn't notice this comment. I can confirm, that this doesn't work, however, what I see, is that it's not the problem of the ID because the entire request of Curl never arrives at the routing table. The same string works perfectly in browser. Can you confirm this?
I'll take a look into this today in the evening.
No, I get "Nothing found" at http://www.notehub.org/api/note/?noteID=2014%201%2019%20this-is-a-test-26&version=1.1 in Chrome as well.
Ok, got it: you are using as url
http://www.notehub.org/api/note/
the last slash makes this a completely different route. It should be
http://www.notehub.org/api/note
Also, I don't like spaces as separators anymore :-)
PS: I'll change it in the next API version with backwards compatibility, of course.
I posted a new note via API and got back
The long url is correct. The ID seems to be missing slashes. The short url results in "OMG Server Exploded".
Did I do something wrong?