无法从Gmail API(Users.messages:send)获得响应--通过IonicFramework+AngularJS在移动设备上运行

无法从Gmail API(Users.messages:send)获得响应--通过IonicFramework+AngularJS在移动设备上运行,angularjs,email,ionic-framework,gmail-api,Angularjs,Email,Ionic Framework,Gmail Api,我能够发送电子邮件成功使用没有问题。接收者在几秒钟后收到电子邮件,但应用程序没有收到GMail的响应,即threadid、id等。。。描述 我通过IonicFramework在移动设备上运行它,顺便说一句,w/c使用angularJS。有什么不对劲吗 $http({ method: 'POST', url: 'https://www.googleapis.com/upload/gmail/v1/users/me/messages/send?uploadType=multipart',

我能够发送电子邮件成功使用没有问题。接收者在几秒钟后收到电子邮件,但应用程序没有收到GMail的响应,即threadid、id等。。。描述

我通过IonicFramework在移动设备上运行它,顺便说一句,w/c使用angularJS。有什么不对劲吗

$http({
  method: 'POST',
  url: 'https://www.googleapis.com/upload/gmail/v1/users/me/messages/send?uploadType=multipart',
  headers: {
    'Authorization':'Bearer '+ access_token,
    'Content-Type': 'multipart/mixed; boundary="foo_bar_baz"'
  },
  data: emailStr
})
.success(function(data, status, headers, config){
  console.log(data);            
})
.error(function(data, status, headers, config){
   console.log(data);                
});
emailStr包含base64编码的邮件

请求详细信息如下所示:

Request URL: https://www.googleapis.com/upload/gmail/v1/users/me/messages/send?uploadType=multipart
Request Headers
Accept:application/json, text/plain, */*
Authorization:Bearer <<token here>>
Content-Type:multipart/mixed; boundary="foo_bar_baz"
Origin:file://
User-Agent: <<User agent data>>
Query String Parameters
uploadType:multipart
Request Payload
--foo_bar_baz
Content-Type: application/json; charset="UTF-8"

{"raw":"<<encoded string>>"}
--foo_bar_baz--

首先要检查的地方是浏览器的网络控制台,以查看正在发出的请求和返回的响应。我确实检查了,但没有得到响应。最终它只是说失败了。那么想补充一些细节吗?请求超时了吗?响应状态代码/标题是什么?它运行了2.1分钟,没有给出回复。所以我假设它是超时的。我将请求详细信息放在问题上,以便更容易查看。来源:文件://