×

Discussion Board

Results 1 to 9 of 9

Thread: HTTP POST test

  1. #1
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    105

    HTTP POST test

    Hello,

    does anyone know a server where could I send POST request and it would reponse something? Perhaps there is a server in internet for testing HTTP requests sending?

  2. #2

  3. #3
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    105

    Re: HTTP POST test

    Thanks!

    One more question

    How should I use this pages to test if my POST works? Just send a POST message to one of those address? Does it return something back to my client?

  4. #4
    Registered User
    Join Date
    Oct 2004
    Posts
    89

    Re: HTTP POST test

    Hi

    I think one of the site sends you back some text.
    Not sure which one is that amonst the two.
    Once you get back some text you can be sure that your post works.

    halderp

  5. #5
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    105

    Re: HTTP POST test

    Quote Originally Posted by halderp
    Hi

    I think one of the site sends you back some text.
    Not sure which one is that amonst the two.
    Once you get back some text you can be sure that your post works.

    halderp
    Thanks need to test it later at home.

  6. #6
    Nokia Developer Expert
    Join Date
    Jul 2003
    Location
    Vancouver, Canada
    Posts
    220

    Re: HTTP POST test

    When developing HTTP apps before I have found it useful to set-up and run a HTTP server APACHE on my local machine. It is very useful as you can then look through the server logs.

    If you install the network analyser http://www.ethereal.com/ you will be able to capture the data on the wire to/from the server. This will help you find problems far easier as ethereal wil break down your HTTP request and inform you of errors.

    Hope this helps

  7. #7
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    105

    Re: HTTP POST test

    Quote Originally Posted by halderp
    Hi

    I think one of the site sends you back some text.
    Not sure which one is that amonst the two.
    Once you get back some text you can be sure that your post works.

    halderp
    Im doing like this and it return 500 Internal Server Error

    Code:
    _LIT(KLocalHost, "38.118.200.14");
    _LIT8(KRequest, "POST /cgi-bin/book_post.cgi HTTP/1.0\r\n\r\n Series 60 \n\r\n\r");
    const TInt KPort = 80;
    
    ...
    iServerAddr.Input( KLocalHost );
    iServerAddr.SetPort( KPort );
    ...
    iSocket.Connect( aIpAddress, iStatus );
    ...
    iSocket.Write(iData, iStatus);
    ...
    iSocket.RecvOneOrMore(iRecvBuffer, 0, iStatus, iLen);
    This returns 200 OK, but after I connect again it return 400 Bad Request

    Code:
    _LIT(KLocalHost, "38.118.200.14");
    _LIT8(KRequest, "POST HTTP/1.0\r\n\r\n Series 60 \n\r\n\r");
    const TInt KPort = 80;
    So im asking that does my POST works or not?

    What do you think that do we have a problem at server side or client side because our servers got my POST but client cant get any response even how hard we are trying to send it from server? iStatus returns -2 when response message cant be get... Where could I see those iStatus error codes?

  8. #8
    Nokia Developer Expert
    Join Date
    Jul 2003
    Location
    Vancouver, Canada
    Posts
    220

    Re: HTTP POST test

    My advise is to use a web browser e.g firefox to send an HTTP post (i.e load a page)
    http://cgi.www.emccsoft.com/cgi-bin/...ft.com/post.pl returns
    Code:
    Hello Fred!
    and http://www.magpiemobile.com/cgi-bin/book_post.cgi returns
    Code:
    I didn't find a NAME parameter.
    If you set up Ethereal and capture the TCPIP packets over your ethernet connection you will be able to filter out the HTTP requests and see the required sequence of events. You then make your code do the same and use ethereal to check/debug.

    Hope this helps

  9. #9
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    105

    Re: HTTP POST test

    Quote Originally Posted by billbonney
    My advise is to use a web browser e.g firefox to send an HTTP post (i.e load a page)
    http://cgi.www.emccsoft.com/cgi-bin/...ft.com/post.pl returns
    Code:
    Hello Fred!
    and http://www.magpiemobile.com/cgi-bin/book_post.cgi returns
    Code:
    I didn't find a NAME parameter.
    If you set up Ethereal and capture the TCPIP packets over your ethernet connection you will be able to filter out the HTTP requests and see the required sequence of events. You then make your code do the same and use ethereal to check/debug.

    Hope this helps
    I have used this Ethereal and it looks great. Some why Mozilla Firefoxs uses GET /cgi-bin/book_post.cgi HTTP/1.1\r\n not POST. I assume that so it should work because im just loading URL. Well I will filter out this HTTP POST which I do after "Submit Reply" and see how does request look like

    Edit: POST /forum/newreply.php/ HTTP/1.1\r\n was the POST header. So it looks like that our server should have reply.php waiting for our POST and we shouldnt POST our request directly to servers IP-address.

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. HTTP Client - Synchronous HTTP POST Calls?
    By symbian_ravi in forum Symbian Networking & Messaging (Closed)
    Replies: 5
    Last Post: 2006-04-16, 11:51
  3. About Dialog
    By lilesh in forum Symbian User Interface
    Replies: 2
    Last Post: 2005-05-30, 05:11
  4. 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
  5. 7650 J2ME/MIDP HTTP Post
    By cwalkinshaw in forum Mobile Java General
    Replies: 2
    Last Post: 2002-10-23, 10:12

Posting Permissions

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