'use strict';

var Promise = require('lie'),
	request = require('superagent');

module.exports = function requestXsrfToken () {
	return new Promise(function (resolve, reject) {
		request
			.post('/d2l/lp/auth/xsrf-tokens')
			.end(function (err, res) {
				if (err) {
					return reject(err);
				}

				return resolve(res.body.referrerToken);
			});
	});
};

@@ -188,11 +188,10 @@
 %09%09%09.
-pos
+ge
 t('/

the request for tokens should be a GET