vlucas/frisby — pull request #39 by phillipfurtado (2013-07-30 13:41:00+00:00)
Title: Improvements on frisby code

Helllo Vance Lucas, I'm sending this pull request of two commits, where the first one the user can inform on the request the certificate that he wants to use, for example:

var secureParams = {
key: fs.readFileSync("./key.pem"),
cert: fs.readFileSync("./cert.pem"),
passphrase: 'pass',
rejectUnauthorized: 'false'
};

frisby.create('Ensure we are dealing with a teapot')
.post('https://something.com', {"a":"b"}, secureParams)
.expectStatus(200)
.toss()

And the second commit is related to the possibility of user be able to do something with response body of the request, for example:

frisby.create('Ensure we are dealing with a teapot')
.post('https://something.com', {"a":"b"}, secureParams)
.expectStatus(200)
.inspectBody(function(body){
anotherFrisbyCall(body);
})
.toss()

That what I have to contribute for now, I using frisby in my project for now and I hope to contribute more in the near future.