像这种jquery扩展的方法调用后怎么传入访问地址?

问题描述:

rest: function (options) {
$.extend(options, {
dataType:'json',
contentType:'application/json;charset=utf-8',
processData : false,
type:'post',
data:JSON.stringify(options.data)
});
//如果定义了异常处理方法,则不进行默认处理
$.extend(true, options, {
error:function (XMLHttpRequest, textStatus, errorThrown) {
$.restError(XMLHttpRequest, textStatus, errorThrown);
}
})
this.ajax(options);
}
像以上这种扩展方式,调用$.rest();传入的是参数和url的对象吗?

这个是jquery插件,配置和jquery的ajax一样的就行了。
$.rest({url:'xxxxxxxxx',.....其他配置,用来覆盖默认配置,如dataType,contentType等等。。。})