Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

Commit

Permalink
comms:http:server: Add debug information for tests
Browse files Browse the repository at this point in the history
Add some snippets to use curl to test the server's node

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
  • Loading branch information
ceolin committed Sep 25, 2015
1 parent ebe041f commit 93ac3ac
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/samples/flow/http-server/boolean.fbp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


# To make a post
# curl --data "value=true" http://localhost:80/boolean -v
#
# To make a get and ask for the response be a json
# curl -H "Accept:application/json" http://localhost:80/boolean -v
#
# To get only if the value has changed since Mon, 17 Aug 2015 15:05:38 GMT
# curl -H "If-Since-Modified:Mon, 17 Aug 2015 15:05:38 GMT" http://localhost:80/boolean -v

# Reads key 'a' (code 97) from keyboard (stdin) and toggles state,

keyboard(keyboard/boolean:binary_code=97,toggle=true) OUT -> IN boolean(http-server/boolean:path=/boolean,value=false)
Expand Down
8 changes: 8 additions & 0 deletions src/samples/flow/http-server/drange.fbp
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,13 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

# To make a post
# curl --data "value=10.2&min=3.4&max=100.000&step=1.1" http://localhost:80/drange -v
#
# To make a get and ask for the response be a json
# curl -H "Accept:application/json" http://localhost:80/drange -v
#
# To get only if the value has changed since Mon, 17 Aug 2015 15:05:38 GMT
# curl -H "If-Since-Modified:Mon, 17 Aug 2015 15:05:38 GMT" http://localhost:80/drange -v
drange(http-server/float:path=/drange,value=val:1.0|min:0|max:100.2|step:1.2)
drange OUT -> IN console(console)
8 changes: 8 additions & 0 deletions src/samples/flow/http-server/irange.fbp
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,13 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

# To make a post
# curl --data "value=10&min=3&max=100&step=1" http://localhost:80/irange -v
#
# To make a get and ask for the response be a json
# curl -H "Accept:application/json" http://localhost:80/irange -v
#
# To get only if the value has changed since Mon, 17 Aug 2015 15:05:38 GMT
# curl -H "If-Since-Modified:Mon, 17 Aug 2018 15:05:38 GMT" http://localhost:80/irange -v
irange(http-server/int:path=/irange,value=val:1|min:0|max:100|step:1)
irange OUT -> IN console(console)
8 changes: 8 additions & 0 deletions src/samples/flow/http-server/string.fbp
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,13 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

# To make a post
# curl --data "value=Hello World" http://localhost:80/string -v
#
# To make a get and ask for the response be a json
# curl -H "Accept:application/json" http://localhost:80/string -v
#
# To get only if the value has changed since Mon, 17 Aug 2015 15:05:38 GMT
# curl -H "If-Since-Modified:Mon, 17 Aug 2018 15:05:38 GMT" http://localhost:80/string -v
string(http-server/string:path=/string,value="Hello, Server")
string OUT -> IN console(console)

0 comments on commit 93ac3ac

Please sign in to comment.