Url( using put method


#1

How do I structure a put method. I did the following but received an error.
url(“http://www.somesite.com/some/resource",“METHOD”,"PUT”, “data to put” )


#2

What’s the “data to put”? You definitely can’t add data that way. Most likely whatever web server you are accessing is expecting data in the same format as when doing a post request, so it would be submitted like this:

url("http://www.somesite.com/some/resource",
    "METHOD","PUT",
    "POST", initializedictionary("Name","John Smith","Email","jsmith@xyzmail.com"))

Are you sure that you want to use PUT? It’s pretty rare for a server to use that method, but if you have server documentation that says use PUT, this is how to do it. I’ve just now added this information to the documentation for url(, and also fixed a typo I found (it says URLs are accessed via the GET or PUT HTTP methods, but it should say GET or POST.