|
|
Re: Use REST client to change the attribute of Container [message #1741901 is a reply to message #1741897] |
Tue, 30 August 2016 14:06 |
Francois Aissaoui Messages: 38 Registered: April 2015 |
Member |
|
|
Hi Can,
To update a resource you have to make a PUT http operation targeting the resource you want to update.
The payload has to be the representation of the attributes you want to change.
In your case, to update the "mia" attribute of a container, the request is:
PUT /~/in-cse/in-name/{YOUR_CONTAINER_LOCATION} HTTP/1.1
Host: localhost:8080
Content-Type: application/xml
X-M2M-Origin: admin:admin
X-M2M-RI: 123456
<?xml version="1.0" encoding="UTF-8"?>
<m2m:cnt xmlns:m2m="http://www.onem2m.org/xml/protocols" >
<mia>1</mia>
</m2m:cnt>
Regards,
François
|
|
|
Powered by
FUDForum. Page generated in 0.04191 seconds