Skip to content
This repository was archived by the owner on Mar 18, 2019. It is now read-only.
This repository was archived by the owner on Mar 18, 2019. It is now read-only.

Encoding forced to application/json #47

Description

@EdNutting

Hi,

This line of code unintentionally forces the encoding of all links to be "application/json".

return new document.Link(url, method, 'application/json', fields, title, description)

I think what was intended was additional code for determining the encoding from the data and defaulting to application/json if necessary:

var encoding = getString(data, 'encoding') || 'application/json';
...
return new document.Link(_url, method, encoding, fields, _title, _description);

Hope this helps,
Ed

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