Skip to content

If-None-Match header missing #104

Description

@GinovskiIvan

Hi there,
I am trying to integrate the tincan library with an application of mine and I am looking to create an activity profile on a xAPI Learning Record Store. Now, when trying to save this new activity, there is an error popping up, something like: If-None-Match & If-Match headers are both missing. This is due to creating the profile for the first time and I want to set a header If-None-Match="*", but there is no possibility for that. Now I was looking through the RemoteLRS class and I saw that there is an optional header to put the If-Match into the sending statement when saving the activity profile, could you implement something like that for the If-None-Match header as well?

if (func_num_args() > 3) { $options = func_get_arg(3); if (isset($options)) { if (isset($options['contentType'])) { $requestCfg['headers']['Content-Type'] = $contentType = $options['contentType']; } if (isset($options['etag'])) { $requestCfg['headers']['If-Match'] = $options['etag']; } } }

There would need to be an additional else if stating:

if (isset($options['If-None-Match'])) { $requestCfg['headers']['If-None-Match'] = $options['If-None-Match']; }

Is this doable? Thank you in advance.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions