How would I translate instructions showing an example using curl for an HTTP PUT using HTTPSocket.SendRequest ( Method as String,URL as String, Timeout as Integer ) As String. Here is the example using curl I was provided in the API documentation:
curl -X PUT \\
-d "order[status]=S"
https://domainname.com/something/orders/API_IDnumber
I cannot find any example on how to include the string “order[status]=S”. The requirement to provide this order status update is to do a PUT. If I were going to do a POST I would do it something like the following:
[code] Dim socket As New HTTPSocket
Dim updatestring,urlstring,r,e As String
updatestring = “order[status]=S”
urlstring = “https://domainname.com/something/orders/123456789”
updatestring = DefineEncoding(updatestring,Encodings.UTF8)
socket.SetPostContent(updatestring,"")
r = socket.Post(urlstring,30)
e = RemoteTrigger.HTTPStatusCode
MsgBox Str(e) + ", " + r
[/code]
POST is a defined method with example code but PUT example code is eluding me.