Created
January 13, 2016 18:19
-
-
Save fgalan/f0f44d5113fa88e4825a to your computer and use it in GitHub Desktop.
Subscription curl-based test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Resquest: | |
--------- | |
(curl localhost:1026/v1/subscribeContext -s -S --header 'Content-Type: application/json' --header 'Accept: application/json' -d @- | python -mjson.tool) <<EOF | |
{ | |
"entities": [ | |
{ | |
"type": "Location", | |
"isPattern": "false", | |
"id": "Device-1" | |
} | |
], | |
"reference": "http://52.31.144.170:5050/notify", | |
"duration": "PT10S", | |
"notifyConditions": [ | |
{ | |
"type": "ONCHANGE", | |
"condValues": [ | |
"position" | |
] | |
} | |
], | |
"attributes": [ | |
"position" | |
] | |
} | |
EOF | |
Response: | |
--------- | |
{ | |
"subscribeResponse": { | |
"duration": "PT10S", | |
"subscriptionId": "569694ee767b6bea04a0544e" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment