Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
The default content-type should be automatically applied based on whether a JSONP callback exists.
Proposed resolution
If the default content-type option is selected for a JSON view, use "application/json" if no JSONP callback exists, and use "application/javascript" if a JSONP callback does exist.
Comment | File | Size | Author |
---|---|---|---|
#2 | automatic_content_type-2606746-2.patch | 2.57 KB | jtwalters |
Comments
Comment #2
jtwalters CreditAttribution: jtwalters commentedHere's a patch to provide automatic JSON/JSONP content-type.
Comment #3
jtwalters CreditAttribution: jtwalters commentedComment #4
kenorb CreditAttribution: kenorb commented