Currently I am developing a URCap that has to make a standard http request to a Restful API during the execution of the robot program. I make the http requests with java.io.HttpURLConnection, java.io.BufferedReader etc. in the URCap. The http requests are executing from the generateScript method in the URCap. Is this the right way to make a http requests during the execution of the robot program (after pressing the play button)?
Another problem is that I have to put my URCap in loop and execute the http request several times. The problem is that generateScript method of the URCap executes only once when the URCap is in loop. Any solutions for this?
the generate Script Method should only contribute the desired Script code the UR Program. You probably need a Daemon Process to add this functionality to your Robot Program. Have you already taken a look at the MyDaemonSwing - Sample?
You can add the desired communication in the Daemon and access the functions via XML RPCs.