×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Dec 2008
    Posts
    217

    how to upload data batch using httppost?

    hi all


    it can sync one well, but when sync all record, crashed, what does it wrong ?

    SyncOne(TDes& aPostData)
    {
    iClient->CancelTransaction();
    if(iClient->IsRunning())
    {
    //wait till not running
    SyncOne(aPostData);
    }

    else{
    // Query uri and data to post
    TBuf<KDefaultBufferSize> uri;
    TBuf<KDefaultBufferSize> postData;


    if( aPostData.Length()>0)
    {

    uri.Copy(_L("http://*********?"));
    uri.Append(aPostData);
    // Insert prefix to uri (it must begin with "http://" or "https://")
    TBuf8<KDefaultBufferSize> uri8;
    uri.LowerCase();
    if(uri.Find(KHttpPrefix) == KErrNotFound
    && uri.Find(KHttpsPrefix) == KErrNotFound)
    {
    // If uri does not contain http or https,
    // use the default, "http://"
    uri8.Append(KHttpPrefix8);
    uri8.Append(uri);
    }
    else
    {
    uri8.Copy(uri);
    }
    TBuf8<KDefaultBufferSize> postData8;
    //postData8.Copy(aPostData);
    // Start transaction
    iClient->IssueHTTPPostL(uri8, KMimeType, postData8);
    }
    }

    }
    Last edited by nokia_lin; 2009-04-23 at 03:54.

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,699

    Re: how to upload data batch using httppost?


Similar Threads

  1. Extracting Data via P2P
    By bladetech69 in forum Near Field Communication
    Replies: 3
    Last Post: 2009-02-17, 11:52
  2. help~~~about the CMdaAudioInputStream
    By Dragon_L in forum Symbian Media (Closed)
    Replies: 14
    Last Post: 2008-11-05, 06:11
  3. How can I upload data or download data...
    By dj300_2000 in forum PC Suite API and PC Connectivity SDK
    Replies: 1
    Last Post: 2003-09-11, 14:50
  4. Replies: 1
    Last Post: 2003-07-22, 12:28
  5. Replies: 0
    Last Post: 2002-12-04, 15:46

Posting Permissions

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