Skip to content

how to use? #2

Open
Open
@nateq314

Description

@nateq314

Hi,
Can you please clarify what "Make sure to add this into accepts middleware" means exactly? I import it as:

jsonapi_formatter = require('restify-formatter-jsonapi');

So do you mean to do this?

server.use(restify.acceptParser(jsonapi_formatter));

Currently I'm trying:

const server = restify.createServer({
  formatters: jsonapi_formatter
}

but that doesn't seem to be working, or at least if it is I can't find the formatted JSON in the request object anywhere. Can you please clarify how this is supposed to be used exactly? Would be super grateful.

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