[Opensrf-commits] r1911 - branches/rel_1_2/examples (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Jan 28 22:48:12 EST 2010


Author: dbs
Date: 2010-01-28 22:48:09 -0500 (Thu, 28 Jan 2010)
New Revision: 1911

Added:
   branches/rel_1_2/examples/apache2/
   branches/rel_1_2/examples/math_client_curl.sh
Log:
Backport r1905 from trunk: Add an example Apache virtual host configuration and curl script for testing the math service


Copied: branches/rel_1_2/examples/apache2 (from rev 1905, trunk/examples/apache2)

Copied: branches/rel_1_2/examples/math_client_curl.sh (from rev 1905, trunk/examples/math_client_curl.sh)
===================================================================
--- branches/rel_1_2/examples/math_client_curl.sh	                        (rev 0)
+++ branches/rel_1_2/examples/math_client_curl.sh	2010-01-29 03:48:09 UTC (rev 1911)
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+# Simple demonstration of invoking a public OpenSRF method via curl
+
+# Expected output will be something like:
+# [{"__c":"osrfMessage","__p":{"threadTrace":"0","locale":"en-CA","type":"RESULT","payload":{"__c":"osrfResult","__p":{"status":"OK","statusCode":"200","content":4}}}},{"__c":"osrfMessage","__p":{"threadTrace":"0","locale":"en-CA","type":"STATUS","payload":{"__c":"osrfConnectStatus","__p":{"status":"Request Complete","statusCode":"205"}}}}]
+
+curl -H "X-OpenSRF-service: opensrf.math" --data 'osrf-msg=[{"__c":"osrfMessage","__p":{"threadTrace":0,"type":"REQUEST","payload":{"__c":"osrfMethod","__p":{"method":"add","params":[2,2]}},"locale":"en-CA"}}]' http://localhost/osrf-http-translator



More information about the opensrf-commits mailing list