457 lines
19 KiB
JavaScript
457 lines
19 KiB
JavaScript
goog.provide('ajax.core');
|
|
ajax.core.to_interceptor = ajax.interceptors.to_interceptor;
|
|
/**
|
|
* Call this on the result of `ajax-request` to cancel the request.
|
|
*/
|
|
ajax.core.abort = (function ajax$core$abort(this$){
|
|
return ajax.protocols._abort(this$);
|
|
});
|
|
ajax.core.json_request_format = ajax.json.json_request_format;
|
|
ajax.core.json_response_format = ajax.json.json_response_format;
|
|
ajax.core.transit_request_format = ajax.transit.transit_request_format;
|
|
ajax.core.transit_response_format = ajax.transit.transit_response_format;
|
|
ajax.core.ring_response_format = ajax.ring.ring_response_format;
|
|
ajax.core.url_request_format = ajax.url.url_request_format;
|
|
ajax.core.text_request_format = ajax.formats.text_request_format;
|
|
ajax.core.text_response_format = ajax.formats.text_response_format;
|
|
ajax.core.raw_response_format = ajax.formats.raw_response_format;
|
|
ajax.core.success_QMARK_ = ajax.util.success_QMARK_;
|
|
ajax.core.default_interceptors = ajax.simple.default_interceptors;
|
|
ajax.core.ajax_request = ajax.simple.ajax_request;
|
|
ajax.core.default_formats = ajax.easy.default_formats;
|
|
ajax.core.detect_response_format = ajax.easy.detect_response_format;
|
|
/**
|
|
* accepts the URI and an optional map of options, options include:
|
|
* :handler - the handler function for successful operation
|
|
* should accept a single parameter which is the
|
|
* deserialized response
|
|
* :progress-handler - the handler function for progress events.
|
|
* this handler is only available when using the goog.net.XhrIo API
|
|
* :error-handler - the handler function for errors, should accept a
|
|
* map with keys :status and :status-text
|
|
* :format - the format for the request
|
|
* :response-format - the format for the response
|
|
* :params - a map of parameters that will be sent with the request
|
|
*/
|
|
ajax.core.GET = (function ajax$core$GET(var_args){
|
|
var args__5755__auto__ = [];
|
|
var len__5749__auto___47554 = arguments.length;
|
|
var i__5750__auto___47555 = (0);
|
|
while(true){
|
|
if((i__5750__auto___47555 < len__5749__auto___47554)){
|
|
args__5755__auto__.push((arguments[i__5750__auto___47555]));
|
|
|
|
var G__47556 = (i__5750__auto___47555 + (1));
|
|
i__5750__auto___47555 = G__47556;
|
|
continue;
|
|
} else {
|
|
}
|
|
break;
|
|
}
|
|
|
|
var argseq__5756__auto__ = ((((1) < args__5755__auto__.length))?(new cljs.core.IndexedSeq(args__5755__auto__.slice((1)),(0),null)):null);
|
|
return ajax.core.GET.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__5756__auto__);
|
|
});
|
|
|
|
(ajax.core.GET.cljs$core$IFn$_invoke$arity$variadic = (function (uri,opts){
|
|
var f__46913__auto__ = cljs.core.first(opts);
|
|
return ajax.easy.easy_ajax_request(uri,"GET",(((f__46913__auto__ instanceof cljs.core.Keyword))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,opts):f__46913__auto__));
|
|
}));
|
|
|
|
(ajax.core.GET.cljs$lang$maxFixedArity = (1));
|
|
|
|
/** @this {Function} */
|
|
(ajax.core.GET.cljs$lang$applyTo = (function (seq47359){
|
|
var G__47360 = cljs.core.first(seq47359);
|
|
var seq47359__$1 = cljs.core.next(seq47359);
|
|
var self__5734__auto__ = this;
|
|
return self__5734__auto__.cljs$core$IFn$_invoke$arity$variadic(G__47360,seq47359__$1);
|
|
}));
|
|
|
|
/**
|
|
* accepts the URI and an optional map of options, options include:
|
|
* :handler - the handler function for successful operation
|
|
* should accept a single parameter which is the
|
|
* deserialized response
|
|
* :progress-handler - the handler function for progress events.
|
|
* this handler is only available when using the goog.net.XhrIo API
|
|
* :error-handler - the handler function for errors, should accept a
|
|
* map with keys :status and :status-text
|
|
* :format - the format for the request
|
|
* :response-format - the format for the response
|
|
* :params - a map of parameters that will be sent with the request
|
|
*/
|
|
ajax.core.HEAD = (function ajax$core$HEAD(var_args){
|
|
var args__5755__auto__ = [];
|
|
var len__5749__auto___47557 = arguments.length;
|
|
var i__5750__auto___47558 = (0);
|
|
while(true){
|
|
if((i__5750__auto___47558 < len__5749__auto___47557)){
|
|
args__5755__auto__.push((arguments[i__5750__auto___47558]));
|
|
|
|
var G__47559 = (i__5750__auto___47558 + (1));
|
|
i__5750__auto___47558 = G__47559;
|
|
continue;
|
|
} else {
|
|
}
|
|
break;
|
|
}
|
|
|
|
var argseq__5756__auto__ = ((((1) < args__5755__auto__.length))?(new cljs.core.IndexedSeq(args__5755__auto__.slice((1)),(0),null)):null);
|
|
return ajax.core.HEAD.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__5756__auto__);
|
|
});
|
|
|
|
(ajax.core.HEAD.cljs$core$IFn$_invoke$arity$variadic = (function (uri,opts){
|
|
var f__46913__auto__ = cljs.core.first(opts);
|
|
return ajax.easy.easy_ajax_request(uri,"HEAD",(((f__46913__auto__ instanceof cljs.core.Keyword))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,opts):f__46913__auto__));
|
|
}));
|
|
|
|
(ajax.core.HEAD.cljs$lang$maxFixedArity = (1));
|
|
|
|
/** @this {Function} */
|
|
(ajax.core.HEAD.cljs$lang$applyTo = (function (seq47379){
|
|
var G__47380 = cljs.core.first(seq47379);
|
|
var seq47379__$1 = cljs.core.next(seq47379);
|
|
var self__5734__auto__ = this;
|
|
return self__5734__auto__.cljs$core$IFn$_invoke$arity$variadic(G__47380,seq47379__$1);
|
|
}));
|
|
|
|
/**
|
|
* accepts the URI and an optional map of options, options include:
|
|
* :handler - the handler function for successful operation
|
|
* should accept a single parameter which is the
|
|
* deserialized response
|
|
* :progress-handler - the handler function for progress events.
|
|
* this handler is only available when using the goog.net.XhrIo API
|
|
* :error-handler - the handler function for errors, should accept a
|
|
* map with keys :status and :status-text
|
|
* :format - the format for the request
|
|
* :response-format - the format for the response
|
|
* :params - a map of parameters that will be sent with the request
|
|
*/
|
|
ajax.core.POST = (function ajax$core$POST(var_args){
|
|
var args__5755__auto__ = [];
|
|
var len__5749__auto___47561 = arguments.length;
|
|
var i__5750__auto___47562 = (0);
|
|
while(true){
|
|
if((i__5750__auto___47562 < len__5749__auto___47561)){
|
|
args__5755__auto__.push((arguments[i__5750__auto___47562]));
|
|
|
|
var G__47563 = (i__5750__auto___47562 + (1));
|
|
i__5750__auto___47562 = G__47563;
|
|
continue;
|
|
} else {
|
|
}
|
|
break;
|
|
}
|
|
|
|
var argseq__5756__auto__ = ((((1) < args__5755__auto__.length))?(new cljs.core.IndexedSeq(args__5755__auto__.slice((1)),(0),null)):null);
|
|
return ajax.core.POST.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__5756__auto__);
|
|
});
|
|
|
|
(ajax.core.POST.cljs$core$IFn$_invoke$arity$variadic = (function (uri,opts){
|
|
var f__46913__auto__ = cljs.core.first(opts);
|
|
return ajax.easy.easy_ajax_request(uri,"POST",(((f__46913__auto__ instanceof cljs.core.Keyword))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,opts):f__46913__auto__));
|
|
}));
|
|
|
|
(ajax.core.POST.cljs$lang$maxFixedArity = (1));
|
|
|
|
/** @this {Function} */
|
|
(ajax.core.POST.cljs$lang$applyTo = (function (seq47404){
|
|
var G__47405 = cljs.core.first(seq47404);
|
|
var seq47404__$1 = cljs.core.next(seq47404);
|
|
var self__5734__auto__ = this;
|
|
return self__5734__auto__.cljs$core$IFn$_invoke$arity$variadic(G__47405,seq47404__$1);
|
|
}));
|
|
|
|
/**
|
|
* accepts the URI and an optional map of options, options include:
|
|
* :handler - the handler function for successful operation
|
|
* should accept a single parameter which is the
|
|
* deserialized response
|
|
* :progress-handler - the handler function for progress events.
|
|
* this handler is only available when using the goog.net.XhrIo API
|
|
* :error-handler - the handler function for errors, should accept a
|
|
* map with keys :status and :status-text
|
|
* :format - the format for the request
|
|
* :response-format - the format for the response
|
|
* :params - a map of parameters that will be sent with the request
|
|
*/
|
|
ajax.core.PUT = (function ajax$core$PUT(var_args){
|
|
var args__5755__auto__ = [];
|
|
var len__5749__auto___47585 = arguments.length;
|
|
var i__5750__auto___47586 = (0);
|
|
while(true){
|
|
if((i__5750__auto___47586 < len__5749__auto___47585)){
|
|
args__5755__auto__.push((arguments[i__5750__auto___47586]));
|
|
|
|
var G__47588 = (i__5750__auto___47586 + (1));
|
|
i__5750__auto___47586 = G__47588;
|
|
continue;
|
|
} else {
|
|
}
|
|
break;
|
|
}
|
|
|
|
var argseq__5756__auto__ = ((((1) < args__5755__auto__.length))?(new cljs.core.IndexedSeq(args__5755__auto__.slice((1)),(0),null)):null);
|
|
return ajax.core.PUT.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__5756__auto__);
|
|
});
|
|
|
|
(ajax.core.PUT.cljs$core$IFn$_invoke$arity$variadic = (function (uri,opts){
|
|
var f__46913__auto__ = cljs.core.first(opts);
|
|
return ajax.easy.easy_ajax_request(uri,"PUT",(((f__46913__auto__ instanceof cljs.core.Keyword))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,opts):f__46913__auto__));
|
|
}));
|
|
|
|
(ajax.core.PUT.cljs$lang$maxFixedArity = (1));
|
|
|
|
/** @this {Function} */
|
|
(ajax.core.PUT.cljs$lang$applyTo = (function (seq47419){
|
|
var G__47420 = cljs.core.first(seq47419);
|
|
var seq47419__$1 = cljs.core.next(seq47419);
|
|
var self__5734__auto__ = this;
|
|
return self__5734__auto__.cljs$core$IFn$_invoke$arity$variadic(G__47420,seq47419__$1);
|
|
}));
|
|
|
|
/**
|
|
* accepts the URI and an optional map of options, options include:
|
|
* :handler - the handler function for successful operation
|
|
* should accept a single parameter which is the
|
|
* deserialized response
|
|
* :progress-handler - the handler function for progress events.
|
|
* this handler is only available when using the goog.net.XhrIo API
|
|
* :error-handler - the handler function for errors, should accept a
|
|
* map with keys :status and :status-text
|
|
* :format - the format for the request
|
|
* :response-format - the format for the response
|
|
* :params - a map of parameters that will be sent with the request
|
|
*/
|
|
ajax.core.DELETE = (function ajax$core$DELETE(var_args){
|
|
var args__5755__auto__ = [];
|
|
var len__5749__auto___47589 = arguments.length;
|
|
var i__5750__auto___47590 = (0);
|
|
while(true){
|
|
if((i__5750__auto___47590 < len__5749__auto___47589)){
|
|
args__5755__auto__.push((arguments[i__5750__auto___47590]));
|
|
|
|
var G__47591 = (i__5750__auto___47590 + (1));
|
|
i__5750__auto___47590 = G__47591;
|
|
continue;
|
|
} else {
|
|
}
|
|
break;
|
|
}
|
|
|
|
var argseq__5756__auto__ = ((((1) < args__5755__auto__.length))?(new cljs.core.IndexedSeq(args__5755__auto__.slice((1)),(0),null)):null);
|
|
return ajax.core.DELETE.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__5756__auto__);
|
|
});
|
|
|
|
(ajax.core.DELETE.cljs$core$IFn$_invoke$arity$variadic = (function (uri,opts){
|
|
var f__46913__auto__ = cljs.core.first(opts);
|
|
return ajax.easy.easy_ajax_request(uri,"DELETE",(((f__46913__auto__ instanceof cljs.core.Keyword))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,opts):f__46913__auto__));
|
|
}));
|
|
|
|
(ajax.core.DELETE.cljs$lang$maxFixedArity = (1));
|
|
|
|
/** @this {Function} */
|
|
(ajax.core.DELETE.cljs$lang$applyTo = (function (seq47435){
|
|
var G__47436 = cljs.core.first(seq47435);
|
|
var seq47435__$1 = cljs.core.next(seq47435);
|
|
var self__5734__auto__ = this;
|
|
return self__5734__auto__.cljs$core$IFn$_invoke$arity$variadic(G__47436,seq47435__$1);
|
|
}));
|
|
|
|
/**
|
|
* accepts the URI and an optional map of options, options include:
|
|
* :handler - the handler function for successful operation
|
|
* should accept a single parameter which is the
|
|
* deserialized response
|
|
* :progress-handler - the handler function for progress events.
|
|
* this handler is only available when using the goog.net.XhrIo API
|
|
* :error-handler - the handler function for errors, should accept a
|
|
* map with keys :status and :status-text
|
|
* :format - the format for the request
|
|
* :response-format - the format for the response
|
|
* :params - a map of parameters that will be sent with the request
|
|
*/
|
|
ajax.core.OPTIONS = (function ajax$core$OPTIONS(var_args){
|
|
var args__5755__auto__ = [];
|
|
var len__5749__auto___47592 = arguments.length;
|
|
var i__5750__auto___47593 = (0);
|
|
while(true){
|
|
if((i__5750__auto___47593 < len__5749__auto___47592)){
|
|
args__5755__auto__.push((arguments[i__5750__auto___47593]));
|
|
|
|
var G__47594 = (i__5750__auto___47593 + (1));
|
|
i__5750__auto___47593 = G__47594;
|
|
continue;
|
|
} else {
|
|
}
|
|
break;
|
|
}
|
|
|
|
var argseq__5756__auto__ = ((((1) < args__5755__auto__.length))?(new cljs.core.IndexedSeq(args__5755__auto__.slice((1)),(0),null)):null);
|
|
return ajax.core.OPTIONS.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__5756__auto__);
|
|
});
|
|
|
|
(ajax.core.OPTIONS.cljs$core$IFn$_invoke$arity$variadic = (function (uri,opts){
|
|
var f__46913__auto__ = cljs.core.first(opts);
|
|
return ajax.easy.easy_ajax_request(uri,"OPTIONS",(((f__46913__auto__ instanceof cljs.core.Keyword))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,opts):f__46913__auto__));
|
|
}));
|
|
|
|
(ajax.core.OPTIONS.cljs$lang$maxFixedArity = (1));
|
|
|
|
/** @this {Function} */
|
|
(ajax.core.OPTIONS.cljs$lang$applyTo = (function (seq47454){
|
|
var G__47455 = cljs.core.first(seq47454);
|
|
var seq47454__$1 = cljs.core.next(seq47454);
|
|
var self__5734__auto__ = this;
|
|
return self__5734__auto__.cljs$core$IFn$_invoke$arity$variadic(G__47455,seq47454__$1);
|
|
}));
|
|
|
|
/**
|
|
* accepts the URI and an optional map of options, options include:
|
|
* :handler - the handler function for successful operation
|
|
* should accept a single parameter which is the
|
|
* deserialized response
|
|
* :progress-handler - the handler function for progress events.
|
|
* this handler is only available when using the goog.net.XhrIo API
|
|
* :error-handler - the handler function for errors, should accept a
|
|
* map with keys :status and :status-text
|
|
* :format - the format for the request
|
|
* :response-format - the format for the response
|
|
* :params - a map of parameters that will be sent with the request
|
|
*/
|
|
ajax.core.TRACE = (function ajax$core$TRACE(var_args){
|
|
var args__5755__auto__ = [];
|
|
var len__5749__auto___47598 = arguments.length;
|
|
var i__5750__auto___47599 = (0);
|
|
while(true){
|
|
if((i__5750__auto___47599 < len__5749__auto___47598)){
|
|
args__5755__auto__.push((arguments[i__5750__auto___47599]));
|
|
|
|
var G__47600 = (i__5750__auto___47599 + (1));
|
|
i__5750__auto___47599 = G__47600;
|
|
continue;
|
|
} else {
|
|
}
|
|
break;
|
|
}
|
|
|
|
var argseq__5756__auto__ = ((((1) < args__5755__auto__.length))?(new cljs.core.IndexedSeq(args__5755__auto__.slice((1)),(0),null)):null);
|
|
return ajax.core.TRACE.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__5756__auto__);
|
|
});
|
|
|
|
(ajax.core.TRACE.cljs$core$IFn$_invoke$arity$variadic = (function (uri,opts){
|
|
var f__46913__auto__ = cljs.core.first(opts);
|
|
return ajax.easy.easy_ajax_request(uri,"TRACE",(((f__46913__auto__ instanceof cljs.core.Keyword))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,opts):f__46913__auto__));
|
|
}));
|
|
|
|
(ajax.core.TRACE.cljs$lang$maxFixedArity = (1));
|
|
|
|
/** @this {Function} */
|
|
(ajax.core.TRACE.cljs$lang$applyTo = (function (seq47474){
|
|
var G__47475 = cljs.core.first(seq47474);
|
|
var seq47474__$1 = cljs.core.next(seq47474);
|
|
var self__5734__auto__ = this;
|
|
return self__5734__auto__.cljs$core$IFn$_invoke$arity$variadic(G__47475,seq47474__$1);
|
|
}));
|
|
|
|
/**
|
|
* accepts the URI and an optional map of options, options include:
|
|
* :handler - the handler function for successful operation
|
|
* should accept a single parameter which is the
|
|
* deserialized response
|
|
* :progress-handler - the handler function for progress events.
|
|
* this handler is only available when using the goog.net.XhrIo API
|
|
* :error-handler - the handler function for errors, should accept a
|
|
* map with keys :status and :status-text
|
|
* :format - the format for the request
|
|
* :response-format - the format for the response
|
|
* :params - a map of parameters that will be sent with the request
|
|
*/
|
|
ajax.core.PATCH = (function ajax$core$PATCH(var_args){
|
|
var args__5755__auto__ = [];
|
|
var len__5749__auto___47603 = arguments.length;
|
|
var i__5750__auto___47604 = (0);
|
|
while(true){
|
|
if((i__5750__auto___47604 < len__5749__auto___47603)){
|
|
args__5755__auto__.push((arguments[i__5750__auto___47604]));
|
|
|
|
var G__47606 = (i__5750__auto___47604 + (1));
|
|
i__5750__auto___47604 = G__47606;
|
|
continue;
|
|
} else {
|
|
}
|
|
break;
|
|
}
|
|
|
|
var argseq__5756__auto__ = ((((1) < args__5755__auto__.length))?(new cljs.core.IndexedSeq(args__5755__auto__.slice((1)),(0),null)):null);
|
|
return ajax.core.PATCH.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__5756__auto__);
|
|
});
|
|
|
|
(ajax.core.PATCH.cljs$core$IFn$_invoke$arity$variadic = (function (uri,opts){
|
|
var f__46913__auto__ = cljs.core.first(opts);
|
|
return ajax.easy.easy_ajax_request(uri,"PATCH",(((f__46913__auto__ instanceof cljs.core.Keyword))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,opts):f__46913__auto__));
|
|
}));
|
|
|
|
(ajax.core.PATCH.cljs$lang$maxFixedArity = (1));
|
|
|
|
/** @this {Function} */
|
|
(ajax.core.PATCH.cljs$lang$applyTo = (function (seq47493){
|
|
var G__47494 = cljs.core.first(seq47493);
|
|
var seq47493__$1 = cljs.core.next(seq47493);
|
|
var self__5734__auto__ = this;
|
|
return self__5734__auto__.cljs$core$IFn$_invoke$arity$variadic(G__47494,seq47493__$1);
|
|
}));
|
|
|
|
/**
|
|
* accepts the URI and an optional map of options, options include:
|
|
* :handler - the handler function for successful operation
|
|
* should accept a single parameter which is the
|
|
* deserialized response
|
|
* :progress-handler - the handler function for progress events.
|
|
* this handler is only available when using the goog.net.XhrIo API
|
|
* :error-handler - the handler function for errors, should accept a
|
|
* map with keys :status and :status-text
|
|
* :format - the format for the request
|
|
* :response-format - the format for the response
|
|
* :params - a map of parameters that will be sent with the request
|
|
*/
|
|
ajax.core.PURGE = (function ajax$core$PURGE(var_args){
|
|
var args__5755__auto__ = [];
|
|
var len__5749__auto___47609 = arguments.length;
|
|
var i__5750__auto___47610 = (0);
|
|
while(true){
|
|
if((i__5750__auto___47610 < len__5749__auto___47609)){
|
|
args__5755__auto__.push((arguments[i__5750__auto___47610]));
|
|
|
|
var G__47611 = (i__5750__auto___47610 + (1));
|
|
i__5750__auto___47610 = G__47611;
|
|
continue;
|
|
} else {
|
|
}
|
|
break;
|
|
}
|
|
|
|
var argseq__5756__auto__ = ((((1) < args__5755__auto__.length))?(new cljs.core.IndexedSeq(args__5755__auto__.slice((1)),(0),null)):null);
|
|
return ajax.core.PURGE.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__5756__auto__);
|
|
});
|
|
|
|
(ajax.core.PURGE.cljs$core$IFn$_invoke$arity$variadic = (function (uri,opts){
|
|
var f__46913__auto__ = cljs.core.first(opts);
|
|
return ajax.easy.easy_ajax_request(uri,"PURGE",(((f__46913__auto__ instanceof cljs.core.Keyword))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,opts):f__46913__auto__));
|
|
}));
|
|
|
|
(ajax.core.PURGE.cljs$lang$maxFixedArity = (1));
|
|
|
|
/** @this {Function} */
|
|
(ajax.core.PURGE.cljs$lang$applyTo = (function (seq47513){
|
|
var G__47514 = cljs.core.first(seq47513);
|
|
var seq47513__$1 = cljs.core.next(seq47513);
|
|
var self__5734__auto__ = this;
|
|
return self__5734__auto__.cljs$core$IFn$_invoke$arity$variadic(G__47514,seq47513__$1);
|
|
}));
|
|
|
|
|
|
//# sourceMappingURL=ajax.core.js.map
|