Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

webresponse from httpunit to download  RSS feed

 
James Yang
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was using webresponse to download a file when a form value has been checked and submitted. The response from the webform.submit has a header with an attachment. But the inputStrem.read from the webresponse returns -1. Here is the webresponse:
HttpWebResponse [url=http://f02-f03.nikonipcss.com:80/P2PwebCmdController/download; headers=
CONTENT-TYPE: application/zip
CONTENT-DISPOSITION: attachment; filename=COOLPIXCONNECT_20061206_200851.zip
TRANSFER-ENCODING: chunked
SERVER: Apache-Coyote/1.1
DATE: Mon, 11 Dec 2006 03:58:02 GMT ]

Here is the part of the code:



My question is how to download the attached zip file with webresponse.

Thanks a lot

James
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!