==>http://user:pa...@123.456.789.123:8080/SomeQueryHere
Usually returns a 200 or some xml for example, definately works
I have installed guzzle and am trying to make send out the same thing, and then print the response
First query :
$client = new Client();
$request = $client->get('http://123.456.789.123:8080/SomeQuery');
$request->setAuth('User', 'Pass');
$response = $request->send();
Returns:
Message: Client error response [url] http://123.456.789/System/SomeQuery [status code] 401 [reason phrase] Unauthorized
So its getting there, thought I might try a different structure
$client = new Client();
$credentials = base64_encode('user:pass');
$response = $client->get('123.456.789.123:8080/SomeQueryHere', [
'Authorization' => ['Basic '.$credentials] ]);
Returns:
Type: InvalidArgumentException Message: No method is configured to handle the Authorization config key
I am stuck at the moment and would like to know how why it is unathorized when the credentials are correct and why the second query doesnt work at all?
Can anyone suggest how I can get the queries working please?
Thanks!