a callback function that will be called when a request is about to be made. The function will be called with the request context as an argument and it's expected to return the modified request context.
a callback function that will be called when a response is received. The function will be called with the response context which includes the response and the requestContext as an argument and it's expected to return response.
on success and on error are callbacks that will be called when a request is successful or when an error occurs. The function will be called with the response context as an argument and it's not expeceted to return anything.