src/Providers/HttpProvider.php
public function lookup(string $postcode, string $number): array
    {
        $input = [
            'postcode' => $postcode,
            'number' => $number
        ];

        // Create http request to send
        $request = $this->request($input);

        $response = null;
        try {
            // Make request and parse response
            return $this->parse(
                $response = $this->client->send($request),
                $input
            );
        } catch (GuzzleException $e) {
            // Catch request exceptions and try to parse the response
            if ($e instanceof RequestException && $e->hasResponse()) {
                return $this->parse($e->getResponse(), $input);
            }

            throw new HttpException('Guzzle: ' . $e->getMessage(), $request, $response, $e);
        } catch (Throwable $e) {
            // Only rethrow exceptions from our own package
            if ($e instanceof PostcodesException) {
                throw $e;
            }

            throw new LogicException('Uncaught exception: ' . $e->getMessage(), 0, $e);
        }
    }
public function lookup(string $postcode, string $number): array
    {
        $input = [
            'postcode' => $postcode,
            'number' => $number
        ];

        // Create http request to send
        $request = $this->request($input);

        $response = null;
        try {
            // Make request and parse response
            return $this->parse(
                $response = $this->client->send($request),
                $input
            );
        } catch (GuzzleException $e) {
            // Catch request exceptions and try to parse the response
            if ($e instanceof RequestException && $e->hasResponse()) {
                return $this->parse($e->getResponse(), $input);
            }

            throw new HttpException('Guzzle: ' . $e->getMessage(), $request, $response, $e);
        } catch (Throwable $e) {
            // Only rethrow exceptions from our own package
            if ($e instanceof PostcodesException) {
                throw $e;
            }

            throw new LogicException('Uncaught exception: ' . $e->getMessage(), 0, $e);
        }
    }
public function lookup ( string $ postcode , string $ number ) : array { $ input = [ 'postcode' => $ postcode , 'number' => $ number ] ; // Create http request to send $ request = $ this -> request ( $ input ) ; $ response = null ; try { // Make request and parse response return $ this -> parse ( $ response = $ this -> client -> send ( $ request ) , $ input ) ; } catch ( GuzzleException $ e ) { // Catch request exceptions and try to parse the response if ( $ e instanceof RequestException && $ e -> hasResponse ( ) ) { return $ this -> parse ( $ e -> getResponse ( ) , $ input ) ; } throw new HttpException ( 'Guzzle: ' . $ e -> getMessage ( ) , $ request , $ response , $ e ) ; } catch ( Throwable $ e ) { // Only rethrow exceptions from our own package if ( $ e instanceof PostcodesException ) { throw $ e ; } throw new LogicException ( 'Uncaught exception: ' . $ e -> getMessage ( ) , 0 , $ e ) ; } }
Lookup an address by postcode and house number.

@param  string $postcode
@param  string $number
@return \DevMob\Postcodes\Address\Address[]
@throws \DevMob\Postcodes\Exceptions\NoSuchCombinationException
@throws \DevMob\Postcodes\Exceptions\PostcodesException
Lookup an address by postcode and house number .