Hi
I want to get response body data after sending a post transaction via Http.
after starting the post transaction ,
I get to the relevant event but get an error ("App closed !) when trying to retrieve the data itself .
I mentioned where the error occures in the code below.
important - if I show only the length in the info message , it shows that I get data of 291 bytes long, and I also get to the complete successfuly event .
what should I change/add ???
Thanks a lot , TE
Code:case THTTPEvent::EGotResponseBodyData: { MHTTPDataSupplier* body = aTransaction.Response().Body(); TPtrC8 dataChunk; TBool isLast = body->GetNextDataPart(dataChunk); iObserver.ClientBodyReceived(dataChunk); TBuf<256> text; _LIT(KBodyPartReceived, "%d bytes received , data : %S "); TBuf<32> dataChunkBuf; dataChunkBuf.Copy(dataChunk); // **** here the application closes - when trying to do the Copy **** text.Format(KBodyPartReceived, dataChunk.Length(),&dataChunkBuf); HBufC* buff = HBufC::NewL(text.Length()); buff->Des() = text; iController->InfoMsgL(buff); // this is a simple method which shows the buffer as a info message iObserver.ClientEvent(text); if (isLast) { _LIT(KBodyReceived,"Body received"); iObserver.ClientEvent(KBodyReceived); } body->ReleaseData(); }



