sendHttpPutRequest thing config issue

Hi all,

I am trying to create a way to use a rule to add a code and label to a z-wave door lock. Since these settings are in the thing configuration I am using REST api to trigger them. I can trigger them using curl but I can’t seem to get the rule to work no matter what I do. When doing it through the rule I am getting an error 405: Method Not Allowed error but not sure where I am going wrong.

rule "Received Guest Name & Code"
  Item guest_5 received command ON
	val String URL = "*:node10/config"
	var String guestlabel = "testcode"
	var String contenttype = "application/json"
	var String jsondata = '{"usercode_label_4": '+guestlabel+', node_id: 10}'
	val headers = newHashMap("Authorization" -> "Bearer oh.RestCall.TokenCode", "WWW-Authenticate"-> "Basic")

	logInfo("Door Guest Name", "Programming:" + URL + " , " + contenttype + " , " + headers)

	sendHttpPostRequest(URL, contenttype, jsondata, headers, 1000)


When you type a address in a browser it use GET mode you are using POST maybe that has something to do with it.

if it works using curl but it does not work using the OH request use a network sniffer like wireshark and compare the differences in the request.

Thanks, you mentioning POST led me to realize that it was POST instead of PUT. That will teach me for not paying attention to the whole code lol. Got it working thanks.