src/Client.php
public function newRequest($method, $uri, $contentType = null, $body = null)
    {
        // TODO $uri whitelist (trusted domain)

        $headers = [
            'User-Agent' => $this->userAgent,
        ];
        if (!is_null($contentType)) {
            $headers['Content-Type'] = $contentType;
        }

        return new Request(
            $method,
            $uri,
            $headers,
            $body
        );
    }
public function newRequest($method, $uri, $contentType = null, $body = null)
    {
        // TODO $uri whitelist (trusted domain)

        $headers = [
            'User-Agent' => $this->userAgent,
        ];
        if (!is_null($contentType)) {
            $headers['Content-Type'] = $contentType;
        }

        return new Request(
            $method,
            $uri,
            $headers,
            $body
        );
    }
public function newRequest ( $ method , $ uri , $ contentType = null , $ body = null ) { // TODO $uri whitelist (trusted domain) $ headers = [ 'User-Agent' => $ this -> userAgent , ] ; if ( ! is_null ( $ contentType ) ) { $ headers [ 'Content-Type' ] = $ contentType ; } return new Request ( $ method , $ uri , $ headers , $ body ) ; }
Create an API request

@param string $method
@param string|UriInterface $uri
@param string|null $contentType
@param string|null $body
@return Request
Create an API request