Uploading RAPID program to controller via RWS?
AriG
✭
Hello, I am new to RWS and HTTP/API usage in general. I am trying to upload a RAPID module to a virtual controller but I am kind of confused at the moment. I am following the documentation at this link, and the sample call is perplexing me.
curl --digest -u "Default User":robotics -d -X PUT "http://localhost/fileservice/$home/test.txt"
Based on the reading I have been attempting on the subject of RESTful APIs, it seems as though we are telling the controller to create a resource named 'text.txt' and specifying its path on the controller. I am confused though as to how we are specifying what the contents of this file actually are. I thought that the -d tag prefaced the data yet in this specific call I do not see any data (other than the filename) specified. Is this not what the complete call would look like (i.e. the body section is still missing)? If so, what would that look like? Is there another part of this that I am fundamentally misunderstanding? Any help here would be greatly appreciated.
curl --digest -u "Default User":robotics -d -X PUT "http://localhost/fileservice/$home/test.txt"
Based on the reading I have been attempting on the subject of RESTful APIs, it seems as though we are telling the controller to create a resource named 'text.txt' and specifying its path on the controller. I am confused though as to how we are specifying what the contents of this file actually are. I thought that the -d tag prefaced the data yet in this specific call I do not see any data (other than the filename) specified. Is this not what the complete call would look like (i.e. the body section is still missing)? If so, what would that look like? Is there another part of this that I am fundamentally misunderstanding? Any help here would be greatly appreciated.
0
Comments
-
Hi AriG,
You need to use the --data-binary option for this: https://ec.haxx.se/http/http-post#posting-binary
Regards,
Joost0 -
Hi AriG,Were you successful in uploading a file with content using RWS?
I am trying to do the same, and could use some help.0
Categories
- All Categories
- 5.5K RobotStudio
- 393 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 307 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 780 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings