Find the answer to your Linux question:
Results 1 to 9 of 9
is there a command in linux terminal that execute a http request? wget and curl is not a solution......
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2010
    Posts
    23

    [SOLVED] http request command


    is there a command in linux terminal that execute a http request?

    wget and curl is not a solution...

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,440
    I beg to differ.
    wget and curl are very good at http requests.

    But if you want, you can always telnet to port 80 and write each request yourself.
    You must always face the curtain with a bow.

  3. #3
    Linux Newbie
    Join Date
    Oct 2008
    Posts
    153
    Could you explain why they aren't solutions?
    What do you want to do?

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,134
    Use netcat

    Code:
    rcgreen@blue:~$ nc slipstream 80
    GET / HTTP/1.0
    
    HTTP/1.1 200 OK
    Date: Sun, 05 Sep 2010 01:03:48 GMT
    Server: Apache/1.3.41 (Unix) mod_perl/1.30
    Last-Modified: Tue, 10 Aug 2010 22:07:32 GMT
    ETag: "967d-43-4c61cda4"
    Accept-Ranges: bytes
    Content-Length: 67
    Connection: close
    Content-Type: text/html
    X-Pad: avoid browser bug
    
    <html>
    <body>
    <h1>
    rcgreen
    </h1>
    This is the page
    </body>
    </html>
    
    rcgreen@blue:~$

  6. #5
    Just Joined!
    Join Date
    Sep 2004
    Posts
    9
    Perl, lynx, links and telnet.
    There are many alternatives.

    I think you need to be more specific of what you'd like to achieve, and why some alternatives are not viable solutions.

  7. #6
    Just Joined!
    Join Date
    Sep 2010
    Posts
    23
    Thanks for the quick responses,

    My issue is related to Kannel, I guess you all know that Kannel is url based sms gateway that is capable of sending sms to gsm mobiles using computers.

    I would like to know if there is a possible workaround that instead of using a browser to execute Kannel commands, I would like to do it in the terminal. And upon testing, wget and curl doesn't work for what am I trying to do because it is used for transferring files.

  8. #7
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,440
    Your question is solved in the kannel documentation.
    Kannel 1.4.3 User's Guide

    ..and btw: wget, curl, perl, python, etc can do what the docu describes with lynx
    man wget
    man curl
    ..
    Last edited by Irithori; 09-06-2010 at 03:03 AM.
    You must always face the curtain with a bow.

  9. #8
    Just Joined!
    Join Date
    Sep 2010
    Posts
    23
    Thanks for the quick response Irithori,

    I have read the guide and currently trying lynx, but I'm having a problem because it returns with "Authorization failed for sendsms".

    I assume now that my problem is a Kannel issue right now.

  10. #9
    Just Joined!
    Join Date
    Sep 2010
    Posts
    23

    Solved

    Thanks for the responses.

Posting Permissions

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