News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Lorna Mitchell's Blog:
Deprecated Methods in Pecl_Http
October 28, 2010 @ 10:04:59

In a quick post to her blog Lorna Mitchell mentions a deprecated method in pecl_http that could cause problems for you down the road - addRawPostData.

I'm a big fan of pecl_http, which I use quite often as I work so regularly with APIs and on systems where I can get it installed, it's much nicer than PHP's curl extension. Recently though I've been often seeing output which reads: Function HttpRequest::addRawPostData() is deprecated

The alternative is to use the "setBody()" method on the HttpRequest object instead. This, in effect, does the same thing and sets the contents of the message to the raw data you'd like to post. Unfortunately, the PHP manual page doesn't reflect that this method is deprecated. You can find out more about the functionality the "pecl_http" extension has to offer here. It's a very flexible and reliable way for your scripts to interact with remote servers via HTTP calls.

2 comments voice your opinion now!
httprequest peclhttp extension deprecated addrawpostdata


blog comments powered by Disqus

Similar Posts

Slawek Lukasiewicz's Blog: New Features in PHP 5.4 - JSON Extension & header_register_callback

Derick Rethans's Blog: HTML name attribute deprecated

Brandon Savage's Blog: FIEO: Filtering Input with PHP's Filter Functions

Sebastian Bergmann's Blog: Support for BDD and Stories in PHPUnit 3.3

Vanessa Vasile's Blog:Using PHP to Extract Image Exif Data


Community Events

Don't see your event here?
Let us know!


opinion voicesoftheelephpant extension interview php7 podcast version performance library introduction example framework laravel install release symfony2 conference community series api

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework