×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    May 2008
    Posts
    49

    Please i want a clear HTTP Get code

    i want to send network info to url
    and i get network info ,but i can't
    find an abstract code to use in my code.
    any one has this code.

  2. #2
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,347

    Re: Please i want a clear HTTP Get code

    Quote Originally Posted by rootroot View Post
    i want to send network info to url
    and i get network info ,but i can't
    find an abstract code to use in my code.
    any one has this code.
    Check RHTTPTransaction, RHTTPHeaders etc... API in the SDK help to perform HTTP transactions.

    You should check this example: S60 Platform: HTTP Client API Example v2.1
    Nokia Developer Wiki Moderation team

  3. #3
    Registered User
    Join Date
    May 2008
    Posts
    49

    Re: Please i want a clear HTTP Get code

    i saw this example
    i include ClientEngine.h ClientEngine.cpp
    to my project and use the same code written inClientAppUI.cpp:

    // Issue HTTP get to engine; first cancel possible existing transaction
    iEngine->CancelTransaction();

    // Query uri
    TBuf<KDefaultBufferSize> uri;
    CAknTextQueryDialog* dlg = new (ELeave) CAknTextQueryDialog(uri,
    CAknQueryDialog::ENoTone);

    if (! dlg->ExecuteLD(R_DIALOG_URI_QUERY))
    break;

    iAppView->ResetL();

    // 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 the uri does not contain http or https,
    // use the default, "http://"
    uri8.Append(KHttpPrefix8);
    uri8.Append(uri);
    }
    else
    {
    uri8.Copy(uri);
    }

    // Start transaction
    // TODO:
    TRAPD(err, iEngine->IssueHTTPGetL(uri8));


    but i get error when CClientAppView class
    inhrits from MCoeControlObserver and
    public MClientObserver classes
    error in this line :
    Chttptest2AppView* self = new ( ELeave ) Chttptest2AppView;

    error text:
    Error 15 error: illegal use of abstract class ('MClientObserver::ClientEvent(const TDesC16 &)') c:\Symbian\9.1\httptest2\httptest2\src\httptest2appview.cpp 36

    what's the matter

  4. #4
    Super Contributor
    Join Date
    Jul 2006
    Location
    Oulu, Finland.
    Posts
    1,174

    Re: Please i want a clear HTTP Get code

    MClientObserver is a pure virtual class, hence when you derive your view from it, you have to provide implementation for all the virtual functions declared in MClientObserver.

  5. #5
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,347

    Re: Please i want a clear HTTP Get code

    I assume that you have defined and implemented pure virtual functions provided by these interface classes. Also make sure you have included all required header files.

    It would be good if you can show your header file and implementation of pure virtual functions.
    Nokia Developer Wiki Moderation team

  6. #6
    Regular Contributor
    Join Date
    Jan 2009
    Posts
    74

    Re: Please i want a clear HTTP Get code

    Quote Originally Posted by vasant21 View Post
    MClientObserver is a pure virtual class, hence when you derive your view from it, you have to provide implementation for all the virtual functions declared in MClientObserver.
    Hi vasanth,

    Have u solved the problem? i am doing the same thing, like copied the .h and .cpp from the example..i am getting the error

    Application Closed:
    CONE 14

    what could be the reason.how to solve it. kindly share.

Similar Threads

  1. regarding Http status code 505
    By mrrajesh_1982 in forum Series 40 & S60 Platform Feedback Archive
    Replies: 1
    Last Post: 2006-10-19, 12:34
  2. HTTP return code 406 on Nokia 6600
    By rudyh in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2004-01-17, 16:31
  3. Fixing a bug in an already obfuscated midlet (no source code) ?
    By SPGremlin in forum Mobile Java General
    Replies: 1
    Last Post: 2004-01-12, 21:52
  4. same code of http post, not work on 3650 emulator
    By wasjkf in forum Mobile Java General
    Replies: 1
    Last Post: 2003-07-07, 23:52
  5. How do you get the HTTP code for a response?
    By suboyd in forum General Messaging
    Replies: 0
    Last Post: 2003-05-29, 16:08

Posting Permissions

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