public function post($endpoint, array $options = [])
    {
        $jsonValues = [];

        if (isset($options['json'])) {
            $jsonValues = $options['json'];
        }

        return $this->httpClient->request('POST', 'https://api.craftcms.com/v1/'.$endpoint, [
            'auth' => $this->setAuth(),
            'json' => $jsonValues
        ]);
    }
public function post($endpoint, array $options = [])
    {
        $jsonValues = [];

        if (isset($options['json'])) {
            $jsonValues = $options['json'];
        }

        return $this->httpClient->request('POST', 'https://api.craftcms.com/v1/'.$endpoint, [
            'auth' => $this->setAuth(),
            'json' => $jsonValues
        ]);
    }
public function post ( $ endpoint , array $ options = [ ] ) { $ jsonValues = [ ] ; if ( isset ( $ options [ 'json' ] ) ) { $ jsonValues = $ options [ 'json' ] ; } return $ this -> httpClient -> request ( 'POST' , 'https://api.craftcms.com/v1/' . $ endpoint , [ 'auth' => $ this -> setAuth ( ) , 'json' => $ jsonValues ] ) ; }
Sends a POST request to the Craftnet API

@param       $endpoint
@param array $options

@return mixed|\Psr\Http\Message\ResponseInterface
@throws \GuzzleHttp\Exception\GuzzleException
Sends a POST request to the Craftnet API