Above mentioned example is for version 1.
If you want an working example for v2 see devel-m6w6.rhcloud.com/mdref/http/Env/Response/setContentDisposition
Because windows.php.net/downloads/pecl/releases/http/ stores only v2 versions, all http plugin related function pages at php.net/manual/en/book.http.php should contain the following with big red bloody font:
THIS IS DOCUMENTATION FOR V1 WHICH WE DO NOT SUPPORT ANYMORE. SEE devel-m6w6.rhcloud.com/mdref/http FOR UPDATED DOCUMENTATION. Note: Functions are available by clicking subelements under http at tree which is positioned at right top position.