×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Sep 2005
    Posts
    43

    HTTP Client - Synchronous HTTP POST Calls?

    Hi,

    I am developing a HTTP application using RHTTPSession & RHTTPTransaction. I am issuing multiple HTTP POST(IssueHTTPPost) calls inside a loop. For single HTTP POST, data gets submitted. For multiple HTTP POSTs, the application is not working - data is not getting HTTP POSTed. How can i make the HTTP POST request synchronous? i.e. need to call subsequent HTTP POST only when the first call to HTTP POST has finished.

    Pls help.

    Thanks,
    symbian_ravi

  2. #2
    Registered User
    Join Date
    Apr 2005
    Posts
    6

    Re: HTTP Client - Synchronous HTTP POST Calls?

    I would think this has nothing to do with symbian as such.
    You probably need new socket for each subsequent 'send'.

  3. #3
    Regular Contributor
    Join Date
    Apr 2005
    Posts
    89

    Re: HTTP Client - Synchronous HTTP POST Calls?

    You did specify MHTTPTransactionCallback when you called RHTTPSession's OpenTransactionL, didn't you? MHFRunL with event.iStatus of ESucceeded will be called back when operation is finished. You'd probably also need to call transaction.Response().Body()->ReleaseData() for each event.iStatus of THTTPEvent::EGotResponseBodyData in order to purge data server sends you back. Then call RHTTPTransaction's Cancel() method, and you're ready to SubmitL() it again.

  4. #4
    Registered User
    Join Date
    Sep 2005
    Posts
    43

    Re: HTTP Client - Synchronous HTTP POST Calls?

    Thanks, Marat.

    I am still not clear... any code snippet? How about modifying the code under the GetNextDataPart()?

    Thanks,
    symbian_ravi

  5. #5
    Regular Contributor
    Join Date
    Apr 2005
    Posts
    89

    Re: HTTP Client - Synchronous HTTP POST Calls?

    You can use GetNextDataPart in order to do something with returned data, otherwise you can just dump them with ReleaseData(). I cannot write code for you since I have no idea what your task is (besides I have my own tasks). If you're trying to modify httpexampleclient.cpp, consider writing from scratch instead, it might be easier and clearer.

  6. #6
    Registered User
    Join Date
    Mar 2006
    Posts
    35

    Re: HTTP Client - Synchronous HTTP POST Calls?

    It helped me as well. Thanks, Marat Khalili.
    Last edited by sethuraman; 2006-04-16 at 12:05.

Similar Threads

  1. HTTP POST using Nokia 7650
    By mikael_kinnunen in forum Mobile Java Networking & Messaging & Security
    Replies: 8
    Last Post: 2008-08-19, 23:32
  2. Does Vodafone UK wap gateway supports HTTP POST?
    By jessicay in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2004-07-06, 15:27
  3. Testing HTTP client for Nokia 3650; Looking to share code
    By nawkboy in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2003-09-10, 15:30
  4. 7650 J2ME/MIDP HTTP Post
    By cwalkinshaw in forum Mobile Java General
    Replies: 2
    Last Post: 2002-10-23, 10:12
  5. HTTP POST?
    By dennisluemkemann in forum Mobile Java General
    Replies: 1
    Last Post: 1970-01-01, 02:00

Posting Permissions

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