vendredi 23 octobre 2015

how to set multiple headers on sails hook testing using mocha

how to set multiple headers on testing sails?

example :

request(sails.hooks.http.app)
.get(endpoint)
.set('Content-Type', 'application/json')
.set('Authorization', 'Bearer 12345')
.expect(function(res) {
  console.log(res.body);
})
.end(done);

how to .set multiple headers ?

Aucun commentaire:

Enregistrer un commentaire