Specifying POST tells Compojure that you only want to pass POST requests
on to your liberator resource. That part worked. Liberator then received
the request and passed it through its workflow.
At the "allowed-method?" decision point, liberator checked your
declaration and saw only the default
On 19/02/2015 16:20, Sam Ritchie wrote:
Try adding
:allowed-methods [:get :post]
to your resource.
You'll want to use "ANY" for all liberator routes, since they manage the
responses for incorrect content types internally. If you specify GET or
POST, it's up to you to return the proper response
Try adding
:allowed-methods [:get :post]
to your resource.
You'll want to use "ANY" for all liberator routes, since they manage the
responses for incorrect content types internally. If you specify GET or
POST, it's up to you to return the proper responses if the methods
aren't supported (sin
On 19/02/2015 12:56, Jonathan Barber wrote:
Replace "min" with "minute" in the route (or change "minute" in the curl
POST to "min"). Because the field names don't agree, the compojure
destructing doesn't match and you end up trying to parseInt nil.
Cheers
Thanks for spotting that one :). Sti
On 18 February 2015 at 22:35, gvim wrote:
> On 18/02/2015 15:32, Andy- wrote:
>
>> Without having tested it: I think you're "curl -d" format is wrong. It's
>> not semicolon separated:
>> http://superuser.com/questions/149329/what-is-the-
>> curl-command-line-syntax-to-do-a-post-request
>>
>> HTH
On 18/02/2015 15:32, Andy- wrote:
Without having tested it: I think you're "curl -d" format is wrong. It's
not semicolon separated:
http://superuser.com/questions/149329/what-is-the-curl-command-line-syntax-to-do-a-post-request
HTH
That solved the curl data submission problem but I'm still ge
Without having tested it: I think you're "curl -d" format is wrong. It's
not semicolon separated:
http://superuser.com/questions/149329/what-is-the-curl-command-line-syntax-to-do-a-post-request
HTH
On Wednesday, February 18, 2015 at 7:09:19 AM UTC-5, g vim wrote:
>
> I have a Liberator app which
I have a Liberator app which works with this:
(defresource user [day month year hour min region location]
:available-media-types ["application/json"]
:handle-ok (generate-string (clc/calc day month year hour min 0 (str
region "/" location
(defroutes app-routes
(GET "/user/:day/:month