You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a question about the sendActivityProfile functiion. When passing an object as the profileval the function will always use the POST method.
Unfortunately, when using POST the LearningLocker LRS will ignore the If-Match header and will always store the data sent even if it overwrites an updated profile object. If I modify the code so that it uses PUT, LearningLocker behaves as expected and returns http status 412 - precondtion failed.
Just wondering what the correct behaviour here should be? Is this a fault with the wrapper or the LRS?
And what is the reason POST always being used when profileval is an object but not if profileval is an array? Of the top of my head I would expect POST when creating a new profile and PUT when updating an existing profile, why should the method be dependent on the profile data type?
The text was updated successfully, but these errors were encountered:
For now, POSTs without the etag headers are allowed and the expected behavior from the LRS is to merge the JSON documents together, and overwrite any existing fields with that of the incoming profile so that sounds like it is working correctly on their end. While using If-Match with PUT, as long as the etag value matches the existing document, it should overwrite it.
I will look into the weird behavior with the wrapper regarding objects/arrays. I'm not sure why the profile data type is having any say in what the method will be.
I have a question about the sendActivityProfile functiion. When passing an object as the profileval the function will always use the POST method.
Unfortunately, when using POST the LearningLocker LRS will ignore the If-Match header and will always store the data sent even if it overwrites an updated profile object. If I modify the code so that it uses PUT, LearningLocker behaves as expected and returns http status 412 - precondtion failed.
Just wondering what the correct behaviour here should be? Is this a fault with the wrapper or the LRS?
And what is the reason POST always being used when profileval is an object but not if profileval is an array? Of the top of my head I would expect POST when creating a new profile and PUT when updating an existing profile, why should the method be dependent on the profile data type?
The text was updated successfully, but these errors were encountered: