8 Apr
2011
8 Apr
'11
9:34 p.m.
Hi. How to do ajax with cl-json on Hunchentoot ? Can you give me a simple example, calling a lisp function from javascript ? Thanks
8 Apr
8 Apr
10:38 p.m.
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
5052
Age (days ago)
5052
Last active (days ago)
1 comments
2 participants
participants (2)
-
Haris
-
Henrik Hjelte