Edit report at http://bugs.php.net/bug.php?id=51551&edit=1
ID: 51551 Updated by: dmi...@php.net Reported by: ed at atl dot org Summary: Include custom HTTP headers in request -Status: Assigned +Status: Closed Type: Feature/Change Request Package: SOAP related Operating System: ALL PHP Version: 5.3SVN-2010-04-13 (SVN) Assigned To: srinatar New Comment: You can already send HTTP headers through stream context. <?php $opts = array( 'http'=>array( 'header'=>"New: test header\r\n" ) ); $context = stream_context_create($opts); $client = new SoapClient(NULL, array( 'stream_context' => $ctx, 'location' => 'test://', 'uri' => 'test://')); Previous Comments: ------------------------------------------------------------------------ [2010-06-23 20:28:22] srina...@php.net I agree, it is very useful. I will look more into this patch. thanks for the suggested patch ------------------------------------------------------------------------ [2010-04-13 18:46:30] ed at atl dot org Description: ------------ When creating a soap client, I would also like to be able to identify custom HTTP headers. See attached patch, please include in next release (which will also require the documentation to be included) Test script: --------------- $client = new SoapClient('http://london:8180/testing/headerserver.php?wsdl', array( "trace"=>true, "custom_http_header"=>"New: test header" )); ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=51551&edit=1