Thread: Http Get and Post commands

  1. #1
    Karlo
    Guest

    Http Get and Post commands

    Ive looked through the net and cant seem to find anything about get and send commands with c++

    Do I have to make my own sockets for this or is there a library that can simplify this for me?

  2. #2
    Registered User
    Join Date
    Oct 2002
    Posts
    291
    Is this what your looking for ?

    Code:
    string command = "GET /index.html HTTP/1.1\r\nhost: www.google.com \r\n\r\n";
    
    int x = send(socketfd, command.c_str(), command.length(), 0);
    Here is a tutorial on socket programming.

  3. #3
    I lurk
    Join Date
    Aug 2002
    Posts
    1,361
    Look in the HTTP RFC. It can be found here: http://www.w3.org/Protocols/rfc2616/rfc2616.html

Popular pages Recent additions subscribe to a feed