Thread: Open default browser and send an HTTP request (POST Method)

  1. #1
    Registered User
    Join Date
    Jul 2004
    Posts
    35

    Open default browser and send an HTTP request (POST Method)

    I'm writing a Windows application and I need to open the system's default browser and post data to Web.

    How can I do it? I know I could write a temporarily HTML file with a form that submits just after loading, but I think this way isn't much elegant and besides I have to write and delete temp files constinously. Is there another way of doing this?

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    Opening a browser seems like a clumsy way to do this.

    There are some good APIs for internet access. Try HttpSendRequest on MSDN

  3. #3
    Registered User
    Join Date
    Jul 2004
    Posts
    35
    Thanks for your answer but I really needs to open a browser because the rest of the application is going to happen within a browser. The problem is that I don't want to open a browser and just point it to an URL, I want to post some data, from the browser.

  4. #4
    Registered User
    Join Date
    Sep 2002
    Posts
    52
    Honestly, I'd look into doing some sort of socket thing and making a "mini-browser", but if you really need to open it and input data, I'd look into which browser you wanted to use and work out exactly how to interact with that browser. I suppose you could be lazy and work out a series of tab's and key presses to inut data, but I would strongly recommend you don't.

    I'm sure there are DLL's or libraries you can use to interact with certain programs, but it might be a bit tricky
    - Daniel Wallace

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. HTTP Response from web browser
    By zort15 in forum C# Programming
    Replies: 0
    Last Post: 06-25-2007, 08:35 AM
  2. Client works on a LAN but don't send all the data
    By Niara in forum Networking/Device Communication
    Replies: 9
    Last Post: 01-04-2007, 04:44 PM