Permalink
Browse files

add drakma-cl client example

  • Loading branch information...
filonenko-mikhail committed Jan 27, 2012
1 parent 4fc4bdf commit 89a77feae41058e29bab99de492b7037f01df02e
Showing with 21 additions and 1 deletion.
  1. +12 −0 examples/drakma-client.lisp
  2. +9 −1 src/defmodule.lisp
@@ -0,0 +1,12 @@
+(ql:quickload :drakma)
+(ql:quickload :cl-json)
+
+(drakma:http-request "http://linkfly.ru:8181/jsonrpc"
+ :method :post
+ :content-type "application/json"
+ :content
+ (json:encode-json-alist-to-string
+ '((:id . 1)
+ (jsonrpc . "2.0")
+ (method . "evaluate")
+ (params . ("1 + 2")) ())))
View
@@ -38,4 +38,12 @@
(invoke-rpc (hunchentoot:raw-post-data :force-text t))))
(define-route example ("example")
- (merge-pathnames "examples/js-maxima-rpc-client.html" (asdf:component-pathname (asdf:find-system :maxima-json-rpc))))
+ (merge-pathnames "examples/js-maxima-rpc-client.html" (asdf:component-pathname (asdf:find-system :maxima-json-rpc))))
+
+;;;;;
+(defun new-test (x y z)
+ "Some test functions"
+ (do ((j 0 (1+ j)))
+ ((< 10 j) j)
+ (print j)))
+

0 comments on commit 89a77fe

Please sign in to comment.