I have a grails webservice that takes a binary file as a parameter. This is basically what it looks like:
def index = {
switch(request.method){
case "POST":
def uploadedFile = request.getFile('file')
File f=new File('c:/dev/newfile.tar');
uploadedFile.transferTo(f);
//do something with f
break
}
}
In order to test this, I was using curl - like so:
curl -F [email protected] http://localhost:8080/MyWebS/fileWS
The key being that in order for grails to know how to get the file, I had to define that file=thefile in the curl command.
How does this translate to getting C# to call this same webservice, and pass it a file. What would the file look like? a byte array?