-
Notifications
You must be signed in to change notification settings - Fork 56
MTY_HttpAsyncPoll
chrisd1100 edited this page Aug 25, 2022
·
1 revision
Poll the global HTTP thread pool for a response.
MTY_Async MTY_HttpAsyncPoll(
uint32_t index,
void ** response,
size_t * size,
uint16_t * status
);
index
(uint32_t
)
The thread index acquired in MTY_HttpAsyncRequest
.
response
(void **
)
Set to the response body, or NULL
if there is no response body.
size
(size_t *
)
Set to the response body size, or 0 if there is no response body.
status
(uint16_t *
)
Set to the HTTP response status code.
MTY_ASYNC_OK
means the request has finished and response
, size
, and status
are valid. These values will remain valid until MTY_HttpAsyncClear
is called on the thread index.
MTY_ASYNC_DONE
means there is no request currently pending.
MTY_ASYNC_CONTINUE
means the request is still in progress.
MTY_ASYNC_ERROR
means an error has occurred. Call MTY_GetLog
for details.