Opened 7 years ago

Closed 5 years ago

#12826 closed enhancement (wontfix)

JsonRestStore configurable Accept header

Reported by: frode Owned by: Kris Zyp
Priority: high Milestone: tbd
Component: DojoX Data Version: 1.6.0
Keywords: JsonRestStore, REST Cc:
Blocked By: Blocking:

Description

When calling get() or query() on a JsonRestStore?, an Accept header with value "application/javascript, application/json" is added to the request.

However, with put() or add(), no such header is added. An add() without an identifier will trigger a POST request to the server, and many REST implementations will return the created entity's representation in the response body. Without the Accept header, it's impossible to tell the server that we want the response body to be JSON.

Attachments (1)

JsonRest-with-accept-property.patch (1.5 KB) - added by frode 7 years ago.
Suggested fix.

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by frode

Suggested fix.

comment:1 Changed 6 years ago by cjolif

Component: GeneralDojoX Data
Owner: set to Kris Zyp

I think this one has been implemented (at least in 1.8).

comment:2 Changed 5 years ago by Colin Snover

Resolution: wontfix
Status: newclosed

dojox/data is abandoned. Some dojox/data stores have been upgraded to use the Dojo Store API and can be found at https://github.com/kfranqueiro/dojo-smore.

Note: See TracTickets for help on using tickets.