in reply to Re: problem web xml file
in thread problem web xml file

...

Learn to HTTP people, its not hard :)

$ lwp-request -UuSsEed "http://atys.ryzom.com/api/character.php?key=FR +521366R0REA16F998&part=items GET http://atys.ryzom.com/api/character.php?key=FR521366R0REA16F998&pa +rt=items User-Agent: lwp-request/6.03 libwww-perl/6.04
200 OK
Connection: close
Date: Sun, 01 Jul 2012 21:06:29 GMT
Server: Apache/2.2.12 (Ubuntu)
Content-Encoding: gzip
Content-Length: 666
Content-Type: application/xml; charset=UTF-8
Client-Date: Sun, 01 Jul 2012 21:07:21 GMT
Client-Peer: 91.121.169.188:80
Client-Response-Num: 1
X-Compression: gzip
X-Powered-By: PHP/5.2.10-2ubuntu6.4

Replies are listed 'Best First'.
Re^3: problem web xml file
by sunja (Initiate) on Jul 01, 2012 at 21:31 UTC

    Ahh its compressed! So how would I uncompress it to print to STDOUT?

    I just really need to read and save the file so it should work now but would like to know how to deal with on cmdline.

      It's compressed, but it correctly includes a Content-Encoding HTTP header, so LWP::Simple should be decompressing it for you. (My copy certainly does.)

      perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
        Well, getprint doesn't, mirror doesn't, get does

      My shell doesn't interpolate $ua  perl -CSDL -MLWP::Simple=$ua -e " print $ua->get( shift )->decoded_content "