我正在向Meteor发送一个简单的http调用,并收到HPE_INVALID_HEADER_TOKEN
错误。
HTTP.call('POST', 'http://someurl:port', requestOptions, function (result) {
console.log("The result is: " + result);
});
我要回的痕迹是:
=> App running at: http://localhost:3000/
I20160131-22:42:32.591(8)? Exception while invoking method 'angular:Data/getToken' Error: Parse Error
I20160131-22:42:32.592(8)? at Object.Future.wait (/Users/D/.meteor/packages/meteor-tool/.1.1.10.1b51q9m++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:398:15)
I20160131-22:42:32.592(8)? at Object._.extend.wrapAsync (packages/meteor/helpers.js:119:1)
I20160131-22:42:32.592(8)? at Object.HTTP.call (packages/meteorhacks_kadira/packages/meteorhacks_kadira.js:3070:1)
I20160131-22:42:32.592(8)? at [object Object].getToken (server/data.js:62:1)
I20160131-22:42:32.592(8)? at [object Object].angular.module.provider.run.angular.forEach.angular.forEach.methods.(anonymous function) (angular-meteor-common.js:36:36)
I20160131-22:42:32.592(8)? at [object Object].methodMap.(anonymous function) (packages/meteorhacks_kadira/packages/meteorhacks_kadira.js:2554:1)
I20160131-22:42:32.592(8)? at maybeAuditArgumentChecks (livedata_server.js:1698:12)
I20160131-22:42:32.592(8)? at _.extend.protocol_handlers.method.payload.msg (livedata_server.js:708:19)
I20160131-22:42:32.592(8)? at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20160131-22:42:32.592(8)? at _.extend.protocol_handlers.method.payload.msg (livedata_server.js:706:40)
I20160131-22:42:32.592(8)? - - - - -
I20160131-22:42:32.592(8)? at Socket.socketOnData (http.js:1584:20)
I20160131-22:42:32.592(8)? at TCP.onread (net.js:528:27)
现在我的问题不一定是代码有什么问题,而是:我应该如何在更深层次上调试我的代码。快速浏览一下使用Wireshark的http包,我发送和接收的内容似乎很好。接下来,我想通过代码的Meteor和/或Node.js部分(上面的跟踪所指的)进行调试,以便准确查看解析失败的位置。
我仍然只是熟悉Meteor,并希望得到帮助。谢谢:))