src/Uploadcare/Api.php
public function __preparedRequest($type, $request_type = 'GET', $params = array(), $data = array(), $retry_throttled = null)
    {
        $retry_throttled = $retry_throttled ?: $this->retry_throttled;
        $path = $this->__getPath($type, $params);

        while (true) {
            try {
                return $this->request($request_type, $path, $data);
            } catch (ThrottledRequestException $exception) {
                if ($retry_throttled > 0) {
                    sleep($exception->getTimeout());
                    $retry_throttled--;
                    continue;
                } else {
                    throw $exception;
                }
            }
        }

        return null;
    }
public function __preparedRequest($type, $request_type = 'GET', $params = array(), $data = array(), $retry_throttled = null)
    {
        $retry_throttled = $retry_throttled ?: $this->retry_throttled;
        $path = $this->__getPath($type, $params);

        while (true) {
            try {
                return $this->request($request_type, $path, $data);
            } catch (ThrottledRequestException $exception) {
                if ($retry_throttled > 0) {
                    sleep($exception->getTimeout());
                    $retry_throttled--;
                    continue;
                } else {
                    throw $exception;
                }
            }
        }

        return null;
    }
public function __preparedRequest ( $ type , $ request_type = 'GET' , $ params = array ( ) , $ data = array ( ) , $ retry_throttled = null ) { $ retry_throttled = $ retry_throttled ? : $ this -> retry_throttled ; $ path = $ this -> __getPath ( $ type , $ params ) ; while ( true ) { try { return $ this -> request ( $ request_type , $ path , $ data ) ; } catch ( ThrottledRequestException $ exception ) { if ( $ retry_throttled > 0 ) { sleep ( $ exception -> getTimeout ( ) ) ; $ retry_throttled -- ; continue ; } else { throw $ exception ; } } } return null ; }
Make request to API.
Throws Exception if not http code 200 was returned.
If http code 200 it will parse returned data form request as JSON.

@param string $type Construct type. URL will be generated using this params. Options: store
@param string $request_type Request type. Options: get, post, put, delete.
@param array $params Additional parameters for requests as array.
@param array $data Data will be posted like json.
@param null $retry_throttled
@throws \Exception
@throws \Uploadcare\Exceptions\ThrottledRequestException
@return object|null
Make request to API . Throws Exception if not http code 200 was returned . If http code 200 it will parse returned data form request as JSON .