×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    57

    POST using RHTTP* APIs?

    I have a solution working that successfully performs a GET operation. Program can be quit without problems and returned data is saved to disk. The only difference between the GET opration and POST operation is that to POST operation I include the body and one extra header called Content-Type (yes I'm using params).

    I have set the Content-Type header to be

    text/xml; charset=utf-8

    If I now define the body (with some xml), my program seems to crash after the transaction has been submitted. I can't catch where the actual error occures as it crashes before any method gets called in my program. Now, if I define an empty body, that does not include any data, everything works OK. I get a response from the called page and I can save that response to disk. But in this case the problem comes when I'm quitting my program. If I now call Session's Close() method, it crashes.

    Has anyone managed to get this POST operation to work??

    BTW. My solution is based on the example found in the Symbian SDK. Has anyone got that examples POST to work without any errors?

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    57
    Hasn't anyone got the POST to work using the HTTP APIs in the S60 v20 SDK???

  3. #3
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    57
    I now found the cause for program crashing after transaction's submit when doing POST. If I comment out the lines:

    TRAPD(err, iTrans.NotifyNewRequestBodyPartL());
    if (err != KErrNone) User::Panic(KHttpExampleClientPanic, KCouldntNotifyBodyDataChunk);

    from the ReleaseData that is called. POST works OK. If I put them back, crashing occures. Why is that? I'm using the http example program found from the SDK or you can also check the
    http://www.symbian.com/developer/tec...equestBodyData

    site. ReleaseData method has also been described there. Howcome commenting these lines out help?

    I still have the problem that after POST, when I quit the program. Close() method for the Session crashes. Any ideas why this might be happening...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •