Opened 3 years ago

Closed 13 months ago

#12826 closed enhancement (wontfix)

JsonRestStore configurable Accept header

Reported by: frode Owned by: kzyp
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 3 years ago.
Suggested fix.

Download all attachments as: .zip

Change History (3)

Changed 3 years ago by frode

Suggested fix.

comment:1 Changed 23 months ago by cjolif

  • Component changed from General to DojoX Data
  • Owner set to kzyp

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

comment:2 Changed 13 months ago by csnover

  • Resolution set to wontfix
  • Status changed from new to closed

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.