Sunday, June 19, 2016

Robo4j brick-client POST request using JSON arrays

   The 1st robo4j brick-client POST request version has been using JSON field "command". There was not  implemented support for JSON Arrays. Old POST command has also any type of response. The robo4j socket has been only closed.
--OLD POST--
$curl -H "Content-Type: application/json" -X 
POST -d '{"command" : "right=10;left=10;back=20;move=50"}' http://:8022
   Robo4j alfa-0.2 release introduces POST request with JSON Arrays support. The new array field has name "commands". 
--NEW POST--
$curl -H "Content-Type: application/json" -X POST -d '{"commands" : 
       [{"name" : "move", "value" : "20"},
        {"name" : "back", "value" : "20"}
       ]}' http://:8022
  The new POST request also provides the simple response. The response consists from the HTTP header and text message:
No Information about POST
   The new support of JSON Arrays will allow in upcoming future much better integration with 3rd party technologies.  

@miragemiko has written the short blog post with attached video. The video shows the stability of the robo4j-brick-client.

1 comment:

  1. The evolution from using the "command" field to incorporating JSON Arrays in the robo4j brick-client's POST requests is a significant enhancement. With this change, seamless integration with diverse technologies becomes possible, promising a brighter future in the realm of robotics innovation. If you seek assistance with "digital marketing assignment help," feel free to reach out for valuable insights and guidance to excel in your academic endeavors.

    ReplyDelete