Life Cycle
For an API class extends Barktler, the following request method can be used for requesting.
super._requestForPendingRequest
super._requestForHookedPendingRequest
super._requestForResponseConfig
super._requestForData
These request methods each will return the states of executing a request.
- Find Driver
- Verify Request
- Await Pre Hook Verify
- If invalid, execute the PreVerifyFailing function
- Process Request
- Await Pre Hook Process
- Execute Pre Hook Side Effects
- Await Pre Hook Side Effects
- Send Request
- where
super._requestForPendingRequest
return
- where
- Await Response
- Verify Response
- Await Post Hook Verify
- If invalid, execute the PostVerifyFailing function
- Process Response
- Await Post Hook Process
- Execute Post Hook Side Effects
- Await Post Hook Side Effects
- where
super._requestForHookedPendingRequest
return with abort feature - where
super._requestForResponseConfig
return
- where
- Get response data
- where
super._requestForData
return
- where
When error occurs within request stage, an error will be thrown, see Error Handling for details.
Next
See Cancel Request for the instruction of request canceling as the first usage example of life cycle knowledge.