Skip to content

format :json parses other content-types than application/json (eg. application/x-www-form-urlencoded) #1403

@ciaoben

Description

@ciaoben

I want my API to accept only application/json as a Content-Type. Reading the docs it seems that this should do the work:

class BaseApi < Grape::API
  format :json
  prefix :api
end

but my API still accept other Content-Types

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions