curl rpc with HTTP-Request or JSON-RPC
I’m a newbie at HTTP-Requests and JSON-RPC, looking for some help.
I have this curl statement that works in an Apple bash shell that I’d like to be able to do on a Windows 10 PC from LispWorks 7.1. (I’ve not been able to get this to work in a bash shell under Windows 10).
curl -X POST -H "Content-Type:text/plain;" -d 'RPC={"passwd":"pass","version":"1.0","proc":"GetPlantOverview","id":"1","format":"JSON"}' http://192.168.1.100/rpc
I’ve tried :DRAKMA, :DEXADOR and :JSONRPC with no luck:
(drakma:http-request "http://192.168.1.100/rpc"
:protocol :http/1.0
:method :post
:accept "application/json"
:content-type "application/text"
:parameters '(("passwd" . "pass")
("proc" . "GetPlantOverview")
("id" . "1")
("format" . "JSON")))
Returns a webpage, but not the results of the RPC call.
(dex:post "http://192.168.1.100"
:content '(("passwd" . "pass")
("proc" .. "GetPlantOverview")
("id" . "1")
("format" . "JSON")))
Returns a webpage, but not the results of the RPC call… somehow not unlocking the RPC mechanism in the server.
(defvar *client* (jsonrpc:make-client))
(jsonrpc:client-connect *client* :url "http://192.168.1.100:80/rpc" :mode :tcp)
Throws an error:
Error: Unable to load any of the alternatives: ("libcrypto-1_1.dll" "libeay32.dll")
Looking in c:/system/windows32/ there are “libcrypo.dll” and “libcrypto-1_1-x64.dll” files. I copied the x64 file as “libcrypto-1_1.dll” in both windows and windows32 directories… made no difference. Can’t get jasonrpc not error out.
Would appreciate any help I can get,
Bob