Skip to content
This repository has been archived by the owner on May 28, 2023. It is now read-only.
Percy Mamedy edited this page Jun 8, 2016 · 1 revision

Change Auth Method at runtime

You can change the Auh Method used by the Engine at runtime like so

$engine->useAuthMethod('token')->getDilemma($problem);

Change Credentials at runtime

You can change the credentials to be used by the Engine at runtime like sa

$engine->usingCredentials('anotherCredentialName')->getDilemma($problem);

Custom Headers

If you want to pass custom Http Headers, to use in each API call to Watson:

$engine->appendHeaders(['X-foo' => 'Bar'])->getDilemma($problem);