Hi
I want to use multiple http request in same time.
I'm creating HTTP REST Request and response.
I get response message in OnTransactionReadyToRead function
void HttpForm::OnTransactionReadyToRead(HttpSession& httpSession, HttpTransaction& httpTransaction, int availableBodyLen) { //Called to notify when the content body of the response has been received. AppLog("OnTransactionReadyToRead"); HttpResponse* pHttpResponse = httpTransaction.GetResponse(); HttpHeader* pHttpHeader = pHttpResponse->GetHeader(); if (pHttpHeader != null) { ByteBuffer* pBody = null; String statusText = pHttpResponse->GetStatusText(); String version = pHttpResponse->GetVersion(); pBody = pHttpResponse->ReadBodyN(); String encodedStr((const char*)(pBody->GetPointer())); __pBusNum->SetText(encodedStr); __pBusNum->Invalidate(false); delete pBody; String* tempHeaderString = pHttpHeader->GetRawHeaderN(); ByteBuffer* pBuffer = pHttpResponse->ReadBodyN(); String text(L"Read Body Length: "); text.Append(availableBodyLen); Draw(); delete tempHeaderString; delete pBuffer; } else if(pHttpHeader == null) { AppLog("pHttpHeader is NULL"); } }
1. This code just has 1 http request. But, I think to get message "Transaction is being processed" when I use multiple requests.
Can I use multiple request ?
2. How can I distribute kind of response ? switch and case ? or xml parsing ?
Please let me know,
Thanks.
Best Regards,
Jenny