Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/json/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在文件中添加JSON数据并在请求中发送文件(对于ex:login.js)_Json_Ember.js - Fatal编程技术网

在文件中添加JSON数据并在请求中发送文件(对于ex:login.js)

在文件中添加JSON数据并在请求中发送文件(对于ex:login.js),json,ember.js,Json,Ember.js,我正在客户端使用ember。。 目前我的请求如下 Ember.$.ajax({ url: '/auth/api/authenticate/userpass', type: 'POST', data: JSON.stringify({ identification: credentials.identification, password: credentials.password }), contentType: 'ap

我正在客户端使用ember。。 目前我的请求如下

Ember.$.ajax({      
    url: '/auth/api/authenticate/userpass',
    type: 'POST',
    data: JSON.stringify({
      identification: credentials.identification,
      password: credentials.password
    }),
    contentType: 'application/json',
    dataType: 'json'
  }) ......
关于如何使用javascript将数据添加到JSON文件并将其嵌入到请求中的想法。

“如何将数据添加到JSON文件并将其嵌入到请求中”您是否已经在ajax
data
属性中这样做了?“我如何将数据添加到JSON文件并将其嵌入到请求中”您不是已经在ajax
data
属性中这样做了吗?