I need to trap both HTTP POST 'success' and 'error' conditions within a single sub...
I'm currently using OkHttp to POST API calls to a service and I have 2 Wait For statements as follows:
Wait For postRequest_ResponseError ( ....)
(some code)
Wait For postRequest_ResponseSuccess ( ...)
(some code)
As these events are mutually exclusive it appears I only resume after the first one. If the job is successful, control is never returned to my sub.
Is is possible to wait for one of two mutually exclusive events like this?
Thanks for any help.
I'm currently using OkHttp to POST API calls to a service and I have 2 Wait For statements as follows:
Wait For postRequest_ResponseError ( ....)
(some code)
Wait For postRequest_ResponseSuccess ( ...)
(some code)
As these events are mutually exclusive it appears I only resume after the first one. If the job is successful, control is never returned to my sub.
Is is possible to wait for one of two mutually exclusive events like this?
Thanks for any help.