api test

change ajax to deferred (in fake request).
add tests for get requests.