RobotStudio event

Uploading RAPID program to controller via RWS?

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. 

Comments