> I think that is because the value returned from postForm has an attribute;
> remove it by casting the return to a vector
>
>   fl <- tempfile(fileext=".pdf")
>   writeBin(as.vector(postForm(url, binary=TRUE)), fl)
>
>
> The httr package might also be a good bet
>
>   writeBin(content(POST(url)), fl)

Or write response directly to disk with

POST(url, write_disk(fl))

Hadley

-- 
http://had.co.nz/

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to