Why amber is not sending data correctly when you PUT the query?

This Cygnus. Send a PUT request to update. Buck for the test, just return the title. Using postman works if I set the content type application/x-www-form-urlencoded. The adapter also installed it, but the postman returned a title, and in no ember. Where could be the problem?
RESTAdapter import from 'ember-data/adapters/rest';
import config from '../config/environment';
import Inflector from 'ember-inflector';
import _ from 'lodash';

const { API_HOST, API_PREFIX } = config,
 inflector = Inflector.inflector,
 dataType = 'json',
 contentType = 'application/json; charset=utf-8';

export default RESTAdapter.extend({
 host: API_HOST,
 namespace: API_PREFIX,
 defaultSerializer: 'JSONSerializer',
 headers: {},

 sendRequest(body) {
 return new Ember.RSVP.Promise((resolve, reject) => {
 data => Ember.run(null, resolve, data),
 jqXHR => {
 jqXHR.then = null; // tame jQuery''s ill mannered promises
 Ember.run(null, reject, jqXHR);

 updateRecord(store, type, snapshot) {
 const pathname = inflector.pluralize(_.camelCase(type.modelName)),
 { id } = snapshot;

 let data = this.serialize(snapshot, { includeId: true }),
 namespace = this.get('namespace'),
 host = this.get('host'),
 sendRequest = this.get('sendRequest'),
 headers = this.get('headers'),
 dataType = 'text',
 contentType = 'application/x-www-form-urlencoded',
 url = `${host}/${namespace}/${pathname}/${id}`;

 let sendData = JSON.stringify(data);

 return sendRequest({ type: 'PUT', headers, url, dataType, contentType, sendData });
June 26th 19 at 14:01
1 answer
June 26th 19 at 14:03
Decided. The problem was that Ember sends json, Postman - formdata. Accordingly you need to return as $data = $request->json()->all(); $data['title']

Find more questions by tags Ember.js