how many ms can you find in:
q: rest to create a sharepoint list in node.js hosted offsite i am trying to use request to create a sharepoint list with node. i am 90% sure all my headers are okay, but i am not too sure. i know all the auth headers are populated with values too; any help would be.
var inputjson = {
    connection: {
        siteurl: na,
        tennent: na,
        username: na,
        password: na
    },
    request: {
        title: test list,
        templatetype: 100,
        description: my test list description
    }
};

var toptions = {
    auth: {
        username: inputjson.connection.username,
        password: inputjson.connection.password
    },
    host: inputjson.connection.tennent
};


var sharepoint = require(sharepoint-auth);
sharepoint(toptions, function (err, result) {
    if (err) {
        console.log(err);
    } else {
        var requestoptions = {
            url: inputjson.connection.siteurl + _api/web/lists,
            method: post,
            body: {
                __metadata: {
                    type: sp.list
                },
                allowcontenttypes: true,
                basetemplate: 100,
                contenttypesenabled: true,
                description: my list description,
                title: my test list
            },
            headers: {
                accept: application/json;odata=verbose,
                content-type: application/json;odata=verbose,
                cookie: fedauth= + result.cookies.fedauth + ;rtfa= + result.cookies.rtfa + ;,
                x-requestdigest: result.requestdigest,
                authorization: bearer  + result.accesstoken,
                content-length: 255
            },
            json: true
        };

        var request = require(request);

        function callback(error, response, body) {
            if (!error && response.statuscode == 200) {
                console.log(response);
            } else {
                console.log(error);
            }

        }
        request(requestoptions, callback);

    }
});


a: consider using sp-request module for that purpose.
your code will be:  
var sprequest = require(sp-request);
var creds = {
    username: johndoe@contoso.onmicrosoft.com,
    password: mycoolpass
};
var request = sprequest.create(creds);
request.requestdigest(https://mysharepoint.com/sites/mysite)
    .then(function (digest) {
        return request.post(https://mysharepoint.com/sites/mysite + /_api/web/lists, {
            body: {
                __metadata: { type: sp.list },
                allowcontenttypes: true,
                basetemplate: 100,
                contenttypesenabled: false,
                description: test list,
                title: my list
            },
            headers: {
                x-requestdigest: digest
            }
        });
    })
    .then(function () {
        console.log(list just created!!!);
    }, function (err) {
        if (err.message.indexof(-2130575342) === -1) {
            console.log(hmmmmm something went wrong);
            console.log(err);
            return;
        }
        console.log(list already exists!!!);
    })
        .catch(function (err) {
        console.log(hmmmmm something went wrong);
        console.log(err);
    });
});

actually im the creator, so feel free to ask any further questions. 

user
The total number of "m"s in that passage is forty-two.
assistant