From what I can understand of LSB documentation, neither wget or netcat are standard tools always available in an LSB environment.

Is there some other way to make a http request without being dependent on anything else than LSB?
What would be the most safe tool to be dependent on if I want to make it as simple as possible for users of my tool?

2 Answers 2


LSB is just Linux - and that might be an embedded device with not network at all. So there is no need to define HTTP in LSB.

Apart from that wget should be pretty standard in most distributions (e.g. SuSE uses wget in SuSEregister). Another tool might be curl - but you can not depend on these tools being available.

So if you want to use it - build a proper package and define a dependency (required: wget).

I see no other way for this.

  • Indeed. Then again the LSB includes sendmail and lp. But I don't think it includes any way to do HTTP. Mar 25, 2012 at 23:07

I see that the LSB includes both Perl and Python...Python, at least, includes http tools in the standard library. I didn't investigate to see if the LSB mandates libwww-perl.

If you don't want to write anything yourself and you're happy with output to stdout, you can do this:

python -murllib http://example.com/

And if you're feeling really motivated, you can write a simple http client in bash.

  • RedHat and its clones use python for the package-management - good hint.
    – Nils
    Mar 25, 2012 at 20:07
  • If you have libwww-perl installed then you can also type GET http://foo.com . There are also options for POST and HEAD.
    – Jodie C
    Mar 25, 2012 at 20:55
  • ...hence my question about whether or not the LSB mandates libwww-perl.
    – larsks
    Mar 25, 2012 at 21:13
  • Actually I don't see nor python nor perl in lsb spec commands list ( refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/… ) or even in whole spec ( refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/… ). Can you please show me the place where lsb incudes both perl and python?
    – rush
    Mar 25, 2012 at 21:57
  • I was looking at this page, but it was a quick look...
    – larsks
    Mar 25, 2012 at 22:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .