francesco-coletta / bloodhoudServer

Bloodhoud server in node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Richieste per testare i servizi RESTfull:

cerca un phone tramite imei curl -i -X GET "http://localhost:1337/phones?imei=012345678912340"

curl -i -X GET "http://localhost:1337/phones/phone-{idPhone}/smss?day=2013-01-20&direction=outgoing" curl -i -X GET "http://localhost:1337/phones/phone-{idPhone}/smss?interval[start]=2013-01-24&interval[end]=2013-01-25" curl -i -X GET "http://localhost:1337/phones/phone-{idPhone}/smss?day=2013-01-24&direction=outgoing&phoneNumber=1234567890"

curl -i -X GET "http://localhost:1337/phones/phone-{idPhone}/smss?interval%5Bstart%5D=2013-01-24&interval%5Bend%5D=2013-01-25" NB: le parentesi quadre vanno sostituite con il loro encode [=%5B ]=%5D

POST -crea un nuovo phone curl -i -H "Accept: application/json" -d "imei=123456789012341&name=tizio&phoneNumberSim1=0123456789&phoneNumberSim2=0123456789" -X POST "http://localhost:1337/phones"

DELETE -elimina un phone curl -i -X DELETE "http://localhost:1337/phones/phone-{idPhone}"

POST -crea un nuovo sms curl -i -H "Accept: application/json" -d "direction=outgoing&phoneNumber=0123456789&nameContact=sconociuto&timestamp=YYYY-MM-DDTHH:mm:ss.000Z&text=sms numero 1" -X POST "http://localhost:1337/phones/phone-{idPhone}/smss"

curl -i -H "Accept: application/json" -d "direction=outgoing&phoneNumber=0123456789&nameContact=sconociuto&timestamp=2013-02-19T19:04:00.000Z&text=sms numero 1" -X POST "http://192.168.137.129:1337/phones/phone-000000000000000/sms"

NB: il bodyParser di express non dupporto il Content-Type text/xml quindi il body del POST della chiamata sotto riportata non viene parserizzato curl --verbose -X POST 'http://localhost:1337/phones/phone-123456789012340/smss' --data @Create_sms_POST_XML.xml --header "Content-Type:text/xml" --output Create_sms_POST_XML_response.xml

curl --verbose -X POST 'http://localhost:1337/phones/phone-123456789012340/smss' --data @Create_sms_POST_JSON.xml --header "Content-Type:application/json"

mobile connect to server e cerca un phone mediante il suo imei se non lo trova ne crea uno nuovo se lo trova ok

About

Bloodhoud server in node.js


Languages

Language:JavaScript 82.8%Language:HTML 17.1%Language:Shell 0.1%