Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make examples use piqi exectuable from deps/piqi/priv/piqi-binary/...

  • Loading branch information...
commit f76035e6c800f0357ac032c274feca0d37904825 1 parent abe5a2b
@alavrik authored
View
2  README.md
@@ -63,7 +63,7 @@ Some useful commands:
make test
make dialyzer
- make -C addressbook/example all test
+ make -C addressbook/example deps all test
License
View
22 examples/addressbook/client.sh
@@ -3,24 +3,30 @@
set -x -e
+if [ -z "$PIQI" ]
+then
+ PIQI=deps/piqi/priv/piqi-binary/"`uname -s`-`uname -m`"/piqi
+fi
+
+
curl http://localhost:8888/addressbook
-piqi call http://localhost:8888/addressbook -p
+$PIQI call http://localhost:8888/addressbook -p
-piqi call http://localhost:8888/addressbook -h
+$PIQI call http://localhost:8888/addressbook -h
-piqi call -t json http://localhost:8888/addressbook/get-person -- 0 || true
+$PIQI call -t json http://localhost:8888/addressbook/get-person -- 0 || true
curl -v -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' --data-binary '{"id" : 0}' 'http://localhost:8888/addressbook/get-person'
-piqi call -t json http://localhost:8888/addressbook/list-people
+$PIQI call -t json http://localhost:8888/addressbook/list-people
curl -v -X POST -H 'Accept: application/json' 'http://localhost:8888/addressbook/list-people'
-piqi call -t json http://localhost:8888/addressbook/add-person -- \
+$PIQI call -t json http://localhost:8888/addressbook/add-person -- \
--name "J. Random Hacker" \
--id 10 \
--email "j.r.hacker@example.com" \
@@ -30,15 +36,15 @@ piqi call -t json http://localhost:8888/addressbook/add-person -- \
--mobile \
] || true
-piqi call -t json http://localhost:8888/addressbook/get-person -- 10
+$PIQI call -t json http://localhost:8888/addressbook/get-person -- 10
-piqi convert -t json person.piq
+$PIQI convert -t json person.piq
curl -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' --data-binary @person.piq.json 'http://localhost:8888/addressbook/add-person'
-piqi call -t json http://localhost:8888/addressbook/get-person -- 0
+$PIQI call -t json http://localhost:8888/addressbook/get-person -- 0
curl -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' --data-binary '{"id" : 0}' 'http://localhost:8888/addressbook/get-person'
View
2  examples/addressbook/rebar.config
@@ -1,7 +1,7 @@
{deps, [
%{piqi_rpc, "", {git, "git://github.com/alavrik/piqi-rpc.git", {branch, "dev"}}}
- {piqi_rpc, "", {git, "../../../.git", {branch, "dev"}}}
+ {piqi_rpc, "", {git, "../../../.git", {branch, "HEAD"}}}
]}.
View
16 examples/process_info/client.sh
@@ -3,22 +3,28 @@
set -x # -e
-piqi call http://localhost:8888/process-info -p
+if [ -z "$PIQI" ]
+then
+ PIQI=deps/piqi/priv/piqi-binary/"`uname -s`-`uname -m`"/piqi
+fi
-piqi call http://localhost:8888/process-info -h
+$PIQI call http://localhost:8888/process-info -p
-piqi call -t json http://localhost:8888/process-info/list-processes
+$PIQI call http://localhost:8888/process-info -h
+
+
+$PIQI call -t json http://localhost:8888/process-info/list-processes
curl -v -X POST -H 'Accept: application/json' 'http://localhost:8888/process-info/list-processes'
-piqi call -t json http://localhost:8888/process-info/process-info -- "<0.12.0>"
+$PIQI call -t json http://localhost:8888/process-info/process-info -- "<0.12.0>"
curl -v -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' --data-binary '{"pid" : "<0.12.0>"}' 'http://localhost:8888/process-info/process-info'
-piqi call -t json http://localhost:8888/process-info/list-process-info -- -a -d -m
+$PIQI call -t json http://localhost:8888/process-info/list-process-info -- -a -d -m
curl -v -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' --data-binary '["all", "dictionary", "messages"]' 'http://localhost:8888/process-info/list-process-info'
View
2  examples/process_info/rebar.config
@@ -1,7 +1,7 @@
{deps, [
%{piqi_rpc, "", {git, "git://github.com/alavrik/piqi-rpc.git", {branch, "dev"}}}
- {piqi_rpc, "", {git, "../../../.git", {branch, "dev"}}}
+ {piqi_rpc, "", {git, "../../../.git", {branch, "HEAD"}}}
]}.
Please sign in to comment.
Something went wrong with that request. Please try again.