Skip to content

ETag handling is broken / always return undefined #29

Description

@olessavluk

Hello!

In file https://github.com/comapi/comapi-sdk-js/blob/master/src/profile.ts#L126 you often get etag using following code:

this._localStorage.setString("MyProfileETag", Utils.getHeaderValue(result.headers, "ETag"));

// where this util method implemented like:
public static getHeaderValue(headers: Object, key: string) {
    return headers[key] || headers[key.toLowerCase()];
}

Here you are trying to get it by keys ETag or etag, but both of those fail because you server return it as Etag(see small t):
image

Because of this ETag value always undefined and depending on localStorageData implementation fails during request (or just always ignored)

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