clojure-liberator/liberator — pull request #21 by daviddpark (2013-03-01 20:31:08+00:00)
Title: Out of the box examples currently not running correctly

http://localhost:8000/olympics/index, for example, produces the response "No acceptable resource available." :available-media-types ["text/html" "text/plain"] was added to remedy this.

When I initially played around with the drag-drop demo, I saw that the POST to /drag-drop was returning a response 201, but the athletes atom was not being modified. Upon investigation, I saw that the :create! handler (deprecated?) should perhaps be :post!. Since the clojurescript ajax call was posting raw json, I leveraged ring-json wrap-json-params to properly implement the post function. There is still an issue with the asynchronous nature of the javascript calls from that page, such that the event list does not get updated correctly, and perhaps the athletes list should drop the athlete that was moved to the event box. (I am completely unfamiliar with clojurescript, else I'd have fixed these two... see the TODO related in examples.clj)

Lastly, I added a route for the postbox resource, and left a TODO, hoping that there is some way to provide some way of NOT invoking the :post! handler on a get request. Not sure about this one, have not delved deeply into the liberator core code, but wanted to make mention of an issue.

Happy to converse about these things if there is a better way to implement them, and happy to help with the project if there is some insight you can provide in the areas I am unfamiliar with.