function request(url, fn) {
    var method = 'GET';

    if ('string' == typeof fn) {
        method = url;
        url = fn;
        fn = arguments[2];
    }

    fn = fn || function () {
    };

    o.ajax({ type: method, url: url })
        .success(function (res) {
            res.error
                ? error(res.error)
                : fn(res);
        });
}
Request `url` and invoke `fn(res)`.

@param {String} url
@param {Function} fn