public function getRequestHeaders()
    {
        // common headers
        $headers = array(
            'Accept' => 'application/json',
        );

        // set content type
        if ($this->getHttpMethod() !== 'GET') {
            $headers['Content-Type']    = 'application/x-www-form-urlencoded';
        }

        // prevent duplicate POSTs
        if ($this->getHttpMethod() === 'POST') {
            $headers['Idempotency-Key'] = $this->getIdempotencyKey();
        }

        return $headers;
    }
public function getRequestHeaders()
    {
        // common headers
        $headers = array(
            'Accept' => 'application/json',
        );

        // set content type
        if ($this->getHttpMethod() !== 'GET') {
            $headers['Content-Type']    = 'application/x-www-form-urlencoded';
        }

        // prevent duplicate POSTs
        if ($this->getHttpMethod() === 'POST') {
            $headers['Idempotency-Key'] = $this->getIdempotencyKey();
        }

        return $headers;
    }
public function getRequestHeaders ( ) { // common headers $ headers = array ( 'Accept' => 'application/json' , ) ; // set content type if ( $ this -> getHttpMethod ( ) !== 'GET' ) { $ headers [ 'Content-Type' ] = 'application/x-www-form-urlencoded' ; } // prevent duplicate POSTs if ( $ this -> getHttpMethod ( ) === 'POST' ) { $ headers [ 'Idempotency-Key' ] = $ this -> getIdempotencyKey ( ) ; } return $ headers ; }
Get request headers
@return array Request headers
Get request headers