breeze-client / AjaxAdapter
Interface: AjaxAdapter
Defined in: src/config/interface-registry.ts:76
Handles AJAX requests to server.
Deprecated
Breeze 3 needs no ajax adapter: requests go through config.fetch. Set it with configureBreeze({ fetch }).
Extends
Properties
checkForRecomposition?
optionalcheckForRecomposition?: (context) =>void
Defined in: src/config/config.ts:96
Optional. Called each time any adapter is initialized after this one first was, with { interfaceName, instance, isDefault }, so that this adapter can pick up a new dependency. The data service adapters use it to re-resolve their ajax adapter when a new default ajax adapter is initialized.
Parameters
context
any
Returns
void
Inherited from
BaseAdapter.checkForRecomposition
defaultSettings
defaultSettings:
object
Defined in: src/config/interface-registry.ts:80
Container for headers to be added to each request
headers?
optionalheaders?:object
Headers to add to every request, by name.
Index Signature
[name: string]: string
name
name:
string
Defined in: src/config/config.ts:84
The name the adapter is registered under, such as 'webApi' or 'backingStore'. Names are matched without regard to case. registerAdapter reads it from a throwaway instance and throws if it is empty.
Inherited from
requestInterceptor?
optionalrequestInterceptor?: (req) =>void
Defined in: src/config/interface-registry.ts:85
Function to allow manipulating the request before sending
Parameters
req
Returns
void
Methods
ajax()
ajax(
config):void
Defined in: src/config/interface-registry.ts:78
Function that performs the ajax request and calls the success or error function
Parameters
config
Returns
void
initialize()
initialize():
void
Defined in: src/config/config.ts:90
Called by Breeze each time the adapter is initialized: when it is first created, and again whenever it is initialized by name or registered again, for example by configureBreeze. Resolve anything the adapter depends on here, not in the constructor.
Returns
void