@serenity-is/corelib / ServiceOptions
Interface: ServiceOptions<TResponse>
Extends
RequestInit
Type Parameters
• TResponse extends ServiceResponse
Properties
allowRedirect?
optionalallowRedirect:boolean
Defined in
async?
optionalasync:boolean
Defined in
blockUI?
optionalblockUI:boolean
Defined in
errorMode?
optionalerrorMode:"none"|"alert"|"notification"
Defined in
headers?
optionalheaders:Record<string,string>
A Headers object, an object literal, or an array of two-item arrays to set request's headers.
Overrides
RequestInit.headers
Defined in
request?
optionalrequest:any
Defined in
service?
optionalservice:string
Defined in
url?
optionalurl:string
Defined in
Methods
onCleanup()?
optionalonCleanup():void
Returns
void
Defined in
onError()?
optionalonError(response,info?):boolean|void
Should return true if the error is handled (e.g. notification shown). Otherwise the error may be shown twice.
Parameters
response
TResponse
info?
Returns
boolean | void
Defined in
onSuccess()?
optionalonSuccess(response):void
Parameters
response
TResponse
Returns
void