Skip to content

Instantly share code, notes, and snippets.

@thepassle
Last active February 12, 2021 10:25
Show Gist options
  • Save thepassle/59cda23b985389135c1be84f2644d844 to your computer and use it in GitHub Desktop.
Save thepassle/59cda23b985389135c1be84f2644d844 to your computer and use it in GitHub Desktop.

./index.js:

Exports

kind name declaration module package
js ajax ajax ./src/ajax.js
js setAjax setAjax ./src/ajax.js
js AjaxClass AjaxClass ./src/AjaxClass.js
js cancelInterceptorFactory cancelInterceptorFactory ./src/interceptors.js
js cancelPreviousOnNewRequestInterceptorFactory cancelPreviousOnNewRequestInterceptorFactory ./src/interceptors.js
js addAcceptLanguageHeaderInterceptorFactory addAcceptLanguageHeaderInterceptorFactory ./src/interceptors.js
js jsonPrefixTransformerFactory jsonPrefixTransformerFactory ./src/transformers.js

./src/AjaxClass.js:

class: AjaxClass

Fields

name type privacy default description inheritedFrom
options public

Methods

name privacy description parameters return inheritedFrom
request public Dispatches a request url: string, config: {[key:string]: ?} ?
cancel public msg: string
get public Dispatches a {@link AxiosRequestConfig} with method 'get' predefined url: string, config: {[key:string]: ?} ?
delete public Dispatches a {@link AxiosRequestConfig} with method 'delete' predefined url: string, config: {[key:string]: ?} ?
head public Dispatches a {@link AxiosRequestConfig} with method 'head' predefined url: string, config: {[key:string]: ?} ?
post public Dispatches a {@link AxiosRequestConfig} with method 'post' predefined url: string, data: Object, config: {[key:string]: ?} ?
put public Dispatches a {@link AxiosRequestConfig} with method 'put' predefined url: string, data: Object, config: {[key:string]: ?} ?
patch public Dispatches a {@link AxiosRequestConfig} with method 'patch' predefined url: string, data: Object, config: Object ?
__setupInterceptors public
__setupTransformers public config: {[key:string]: ?}

Exports

kind name declaration module package
js AjaxClass AjaxClass ./src/AjaxClass.js

./src/ajax.js:

Variables

name description type
ajax

Functions

name description parameters return
setAjax setAjax allows the Application Developer to override the globally used instance of {@link:ajax}.

All interactions with {@link:ajax} after the call to setAjax will use this new instance

(so make sure to call this method before dependant code using {@link:ajax} is ran and this

method is not called by any of your (indirect) dependencies.)
newAjax: AjaxClass

Exports

kind name declaration module package
js ajax ajax ./src/ajax.js
js setAjax setAjax ./src/ajax.js

./src/interceptors.js:

Functions

name description parameters return
addAcceptLanguageHeaderInterceptorFactory lang: string (config: {[key:string]: ?}) => {[key:string]: ?}
cancelInterceptorFactory ajaxInstance: AjaxClass (config: {[key:string]: ?}) => {[key:string]: ?}
cancelPreviousOnNewRequestInterceptorFactory (config: {[key:string]: ?}) => {[key:string]: ?}

Exports

kind name declaration module package
js addAcceptLanguageHeaderInterceptorFactory addAcceptLanguageHeaderInterceptorFactory ./src/interceptors.js
js cancelInterceptorFactory cancelInterceptorFactory ./src/interceptors.js
js cancelPreviousOnNewRequestInterceptorFactory cancelPreviousOnNewRequestInterceptorFactory ./src/interceptors.js

./src/transformers.js:

Functions

name description parameters return
jsonPrefixTransformerFactory prefix: string

Exports

kind name declaration module package
js jsonPrefixTransformerFactory jsonPrefixTransformerFactory ./src/transformers.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment