0

I'm reading file residing on HDFS using curl(webhdfs) but problem is with data I'm getting HTTP headers also , How can I get only file data withought headers ?

I'm using below command. If I'm removing "i"' option no output is given

curl i -L --negotiate -u: -X GET "http://hostname:port/webhdfs/v1/user/TRL.TXT?op=OPEN"

Please suggest

Chhaya Vishwakarma
  • 1,407
  • 9
  • 44
  • 72

1 Answers1

0

Look like there is typo in your question(I think i should be -i). If you are using -i option for curl, it will dump headers also. To get file without headers do not use -i option

To get file with headers:

curl -i -L --negotiate -u: -X GET "http://myserver.example.com/myweb/a.html"

To get file without headers:

curl -L --negotiate -u: -X GET "http://myserver.example.com/myweb/a.html"

Shubhangi
  • 2,229
  • 2
  • 14
  • 14