Responding with "*ok*" to a json callback in rails
I have been struggling with this issue for a while now. I am trying to
interface with the Blockchain API using rails. The API notifies my app of
a specific event by means of a callback and I have to answer to this
callback by responding "*ok*". I am having a hard time creating a valid
JSON response that consists only of "*ok*". I can send an empty string
format.json { render :json => {} } or something like format.json { render
:json => {:ok => "*ok*"} } but can't figure out how to send just the
required "*ok*".
http://blockchain.info/api/api_receive
Expected Response In order to acknowledge successful processing of the
callback the server should respond with the text "ok". If the server
responds with anything else the callback will be resent again every new
block (approximately every 10 minutes) up to 1000 times (1 week).
Thank you!
No comments:
Post a Comment