Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updateConnection operation should use POST(CoAP) method #117

Open
wukaishanda08 opened this issue Jul 20, 2017 · 1 comment
Open

updateConnection operation should use POST(CoAP) method #117

wukaishanda08 opened this issue Jul 20, 2017 · 1 comment

Comments

@wukaishanda08
Copy link

In file lwm2m-client.js

function updateRegistration(deviceInformation, callback) {
var rs = new Readable(),
creationRequest = {
host: deviceInformation.currentHost,
port: deviceInformation.currentPort,
method: 'PUT',
pathname: deviceInformation.location,
query: 'lt=' + config.client.lifetime + '&lwm2m=' + config.client.version + '&b=U'
},

The method "PUT" should be "POST". There is no log while updateConnection use PUT. But the console outputs the right log while use POST

@wukaishanda08
Copy link
Author

The lwm2m-server.js recieve POST method, so as the LWM2M Document.

serverInfo.routes = [
    ['POST', /^\/rd$/, 'registration'],
    ['DELETE', /\/rd\/.*/, 'unregistration'],
    ['POST', /\/rd\/.*/, 'updateRegistration']
];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant