How I can set auth type to pre emptive with guzzlehttp client

259 views Asked by At
$response=$client->request("POST",$url,[

    "body"=>$soap,
    "auth"=>["blabla","blabla"]
    'headers' => [
        'Content-Type' => 'text/xml; charset=UTF8',
    ],

]);

my php code but I want set auth type, how I can set auth type?

1

There are 1 answers

0
Oluwafemi Sule On

The authentication type can be passed as the third item in the "auth" array and can be any of "basic", "digest", "ntlm"

"auth" => ["<user>", "<pwd>", "<auth_type>"]