Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293248

Allow default format for REST resources

$
0
0

Currently, in order to use JSON format on GET request, REST API requires ?_format=json.

I suggest introducing a default_format per resource to be used when no ?_format=json is provided.

Proposed format for config/install yaml:

id: demo
langcode: de
status: true
plugin_id: demo
granularity: resource
configuration:
  methods:
    - GET
  default_format: json
  formats:
    - json
  authentication:
    - cookie
dependencies:
  module:
    - serialization

Viewing all articles
Browse latest Browse all 293248

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>