PHP code example of ngabor84 / guzzle-wsse-middleware

1. Go to this page and download the library: Download ngabor84/guzzle-wsse-middleware library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ngabor84 / guzzle-wsse-middleware example snippets




$wsseMiddleware = new \Guzzle\Http\Middleware\WsseMiddleware($username, $password);

$stack = \GuzzleHttp\HandlerStack::create();

$stack->push($wsseMiddleware);

$client   = new \GuzzleHttp\Client(['handler' => $stack]);

// Important: set the auth option to wsse to activate the middleware
$response = $client->get('http://www.8points.de', ['auth' => 'wsse']);