Coder Social home page Coder Social logo

Comments (4)

RoboSparrow avatar RoboSparrow commented on May 28, 2024
curl 'http://dev.experience.at/agents/profile?agent=%7B%22mbox%22%3A%22mailto%3Ajasmine%40brightcookie.com.au%22%2C%22name%22%3A%22Jasmine%20Brightcookie%22%7D&profileId=Jasmine-1-18%2F8%2F2015%2012%3A04%3A10%20pm' -X POST -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' -H 'Accept-Encoding: gzip, deflate' -H 'Accept-Language: en-US,en;q=0.5' -H 'Authorization: Basic MWxRdjN3eHB6WkUwSG9uN2l6STdYeEVhT1VLRUpEOE43WTNZd3NlVDpiVGY3TWdZUXdlNkV3Rjd3WjZJTzY1ZXRsVENrNnFTRlFFTHp6Z3RH' -H 'Content-Length: 59' -H 'Content-Type: application/json; charset=UTF-8' -H 'Host: dev.experience.at' -H 'Origin: http://devel.bo' -H 'Referer: http://devel.bo/lxJasmine/Jasmine/SpecRunner.Agents.html' -H 'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:40.0) Gecko/20100101 Firefox/40.0' -H 'X-Experience-API-Version: 1.0.1'

(Header 'X-Experience-API-Version: 1.0.1')

returns:

409 Conflict , {"error_message":"There was a conflict. Check the current state of the resource and set the \"If-Match \" header with the current ETag to resolve the conflict."}

1.0.3: PUT, POST or DELETE
1.0.2: PUT only
1.0.1: PUT only

from lxhive.

sraka1 avatar sraka1 commented on May 28, 2024

I agree with points 1. and 2., however not with 3.
You can send any headers you want with the extra legacy layer as well. I know however, that some activity providers (namely Storyline) don't do this and as such are violating the spec.

In this case...I think it'd be best if there'd be some sort of extra middleware layer for such cases.

from lxhive.

sraka1 avatar sraka1 commented on May 28, 2024

Defaulting to a minimal supported version is problematic. Why? Because when we have i.e. versions 1.0 and 1.1 available, what if a request without a version comes in and we default to 1.0, but that request is actually a 1.1 request?

Providing a version is an important part of the xAPI spec.
See https://github.com/adlnet/xAPI-Spec/blob/master/xAPI.md#client-requirements-3

Also, in https://github.com/adlnet/xAPI-Spec/blob/master/xAPI.md#client-requirements-4 (1.0.1) it specifies that "A Client using either Agent Profile API or Activity Profile API MUST include the If-Match header or the If-None-Match header.".

from lxhive.

sraka1 avatar sraka1 commented on May 28, 2024

My fault, I had to re-re-read the spec file. The spec actually says "SHOULD*" (so a SHOULD, which will probably become a must in 1.1.0) for POST and DELETE in 1.0.3. Fixed in #28.

Regarding the version header, I believe that Storyline sends this one way or another - either as a header or as a POST parameter using the legacy layer as other also LRS'es reject requests without a version.

Closing this issue.

from lxhive.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.