projects
/
Biblio-RFID.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
implemented REST /beep
[Biblio-RFID.git]
/
scripts
/
RFID-JSONP-server.pl
diff --git
a/scripts/RFID-JSONP-server.pl
b/scripts/RFID-JSONP-server.pl
index
cc1d279
..
6858000
100755
(executable)
--- a/
scripts/RFID-JSONP-server.pl
+++ b/
scripts/RFID-JSONP-server.pl
@@
-302,6
+302,10
@@
sub http_server {
encode_json( $hash );
}
encode_json( $hash );
}
+ } elsif ( $method =~ m{/beep} ) {
+ system "beep -f 800 -r 2 -l 100";
+ print $client "HTTP/1.0 200 OK\r\nContent-Type: application/json\r\n\r\n{ beep: 1 }\n";
+ print "BEEP";
} else {
print $client "HTTP/1.0 404 Unkown method\r\n\r\n";
warn "ERROR 404 $request\n";
} else {
print $client "HTTP/1.0 404 Unkown method\r\n\r\n";
warn "ERROR 404 $request\n";