Hi.
How to do ajax with cl-json on Hunchentoot ? Can you give me a simple example, calling a lisp function from javascript ?
Thanks
On Fri, Apr 8, 2011 at 11:34 PM, Haris fbogdanovic@xnet.hr wrote:
Hi.
How to do ajax with cl-json on Hunchentoot ? Can you give me a simple example, calling a lisp function from javascript ?
Something like this:
(hunchentoot:define-easy-handler (hello :uri "/hello") (name) ;; call with /hello?name=foo (setf (hunchentoot:content-type*) "application/json") (json:encode-json-plist-to-string `(:msg ,(format nil "Hello ~a" name))))
Disclaimer: Untested.. /Henrik