You are viewing a single comment's thread from:

RE: Deleted

in #technology7 years ago

Hi, I have been replying to this post a lot and it is feeling a bit spammy, so I apologise, but I have some suggestions.
Could you please make sure the responses from your server follows a JSON standard. It is not necessary, but it is industry standard. Could you also please return contextText from your private API functions such as vote. Possibly {message: Vote on Post XXX from author XXX successful} or {error: Service down}. I can create a function that builds these responses myself based on the HTTP response code, but I feel it should be included in the server itself.

So I would need to JSON.parse or similar function on the ContentText

Sort:  

Hi!

No need to worry about spamming this post with suggestions 🙂

First, the main idea of this API is to return plain-text data. While it's tru JSON is an industry standard, I personally like clean results. Basically, with the way the API is made, I just send a request and save the output to a variable and that's it. No need to parse JSON or XML.

Second, definitely. Currently the API doesn't return "errors", but it can be easily enabled.