Closed piotrpog closed 10 months ago
Url for requests is incorrect and causes requests to return code 404. It is missing '.svc/json/ part. So, in Client.php file, it should be:
'.svc/json/
public function request(Request $request): Response { if (! $this->account) { throw new InvalidArgumentException('You need to define an account to make a request!'); } $url = rtrim($this->account->apiURL(), '/').'/' . 'ParcelService.svc' . '/' . 'json' . '/' . $request->getEndpoint(); $response = $this->client->request( $request->getMethod(), $url, [ 'json' => $this->payload($request), 'http_errors' => false, ] ); if (! $this->successful($response)) { throw new RequestException($response); } return $this->decodeResponse( $response, $request ); }
Everything is OK. Tested on version 1.7.3. Pass the entire URL (e.g. https://api.mygls.cz/ParcelService.svc/json/) to the apiUrl parameter in the class Account.
Url for requests is incorrect and causes requests to return code 404. It is missing
'.svc/json/
part. So, in Client.php file, it should be: