I know Unity’s www class does not support PUT or DELETE(Unity - Scripting API: WWW), but is there any way or plugin that can achieve this goal? I need to communicate with an embedded device that only accept http PUT for some of its REST APIs.
Please help if you know any solution for this issue. Really appreciate it.
uniweb or .NET’s own httpClient class can do the trick for you. Also you can create the HTTP header yourself and send it to TCP port 80 using a socket but it’s hard and might not make sense. You can find tutorials on MSDN blog about it.
Thanks, guys. I checked out UniWeb as suggested and hoped it works because I am using a Mac. Was not sure how to use it in the beginning so I played around its examples. After a few trials and errors(I even fired WireShark to make it does send HTTP PUT), I finally got it working. Really appreciate for the help!!!
HttpRequest and uniWeb both should work on all platforms. At least on mac mono surely supports HttpRequest class. Most of the .NET’s classes are supported mono now. Stuff like serial port reading/writing are not fully supported yet but most stuff are.
Just tried HttpRequest, and it works too! Sorry that I did not fully understand what you meant by .NET’s own httpClient class earlier until you specified in the last reply. If I were using HttpRequest, I would have saved $25 for purchasing UniWeb. Anyway, as long as things worked out, I am ok with with either solution. Really appreciate for the help!!!
Your very welcome! I think uniweb worth the price because makes things a little easier if i remember correctly. I’ve used UniWeb in a project myself as well, after that i realized HttpRequest,
Hello, I’m giving my first steps on Unity and walked into this issue. I need to do a Delete request but www class does not seems to allow it, how do I use HttpRequest to achieve it?