On Feb 27, 2014, at 10:43 AM, Josh Longbrake <[email protected]> wrote:
> 
> I am getting the error listed in the title when using the code posted below. 
> This is based off of: https://www.npmjs.org/package/node-rest-client
> 

Can you send us the full stack trace?

        --ravi



> fyi: the Bearer, path and client url have been masked as they are client 
> sensitive items.
> 
> middleware:
> 
> angular.module('ruleService', [])
> 
> 
>     
> .factory('Rules', function($http) {
> 
>         
> return {
> 
> 
>             provision 
> : function(data) {
> 
>                 console
> .log('provision: ' + data)
> 
>                 
> return $http.put('/api/provisions/', data);
> 
>             
> }
> }
> service:
> 
> module.exports = function (app) {
> 
>     
> var Client = require('node-rest-client').Client;
> 
>     console
> .log('mdmController:');
> 
> 
>     app
> .put('/api/provisions/', function (data) {
> 
> 
>         console
> .log("provisions prov:" + JSON.stringify(data.body.prov))
> 
>         console
> .log("provisions id:" + JSON.stringify(data.body.id))
> 
> 
>         
> var client = new Client();
> 
> 
>         
> var args = {
> 
>             path
> : '/api/path/to/url/'+ data.body.id,
> 
>             port
> : 443,
> 
>             headers
> : {'Authorization': 'Bearer 0c92f5177d5e818fcc680681f1e9b6895bd5491153'},
> 
>             data
> : data.body.
> prov
>         
> };
> 
> 
>         console
> .log('args:' + args)
> 
> 
>         client
> .put("https://notTheActualSite.com";, args, function (data, response) {
> 
>             console
> .log('put data:' + data);
> 
>             console
> .log('put response:' + response);
> 
>         
> });
> 
> 
>     
> });
> }
> 
> 
> What is being handled incorrectly? As always any and all assistance is 
> greatly appreciated, so Thanks in advance!
> 
> 
> 
> -- 
> -- 
> Job Board: http://jobs.nodejs.org/
> Posting guidelines: 
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>  
> --- 
> You received this message because you are subscribed to the Google Groups 
> "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to