Skip to content

Instantly share code, notes, and snippets.

@jhowbhz
Created October 18, 2022 00:09
Show Gist options
  • Save jhowbhz/ae3ae6be3b880ffb62b0d4d70cce8909 to your computer and use it in GitHub Desktop.
Save jhowbhz/ae3ae6be3b880ffb62b0d4d70cce8909 to your computer and use it in GitHub Desktop.
Guzzle Digest Authentication
$response = Http::withDigestAuth($username, $pass)
->withHeaders([
'Content-Type' => 'application/json',
'Accept' => 'application/json',
])
->withOptions([
'verify' => false,
'query' => [
'info_type' => 'number,type,slot,iccid,imei,signal',
'port' => '28,29,30'
]
])
->get($req_uri, [])
->json();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment