mzabriskie/axios — pull request #21 by epeli (2014-10-21 09:52:49+00:00)
Title: Custom adapters and custom instances

This pull request is not complete. I'll add tests if you are ok functionality wise with this pull request.

## Motivation for custom adapters

I wanted to test my expressjs based rest service application with axios. In order to test the rest api I need to talk to application instance directly without going through a socket. Easiest way to do this is via [supertest](https://github.com/tj/supertest). The adapter for it is [very simple](https://gist.github.com/epeli/0e1543ca0c2f0f2c27ff).

## Motivation for custom instances

When using this I quickly wanted to have a custom instance of axios with my adapter. I've also figured having an ability to set custom default options for custom instances is very useful in other cases such as creating api specific http clients or presetting csrf tokens etc.

What do you think?