final protected function post($resource, $fields)
    {
        // Initilize the request as post
        $this->init('post', $resource);

        // Is an object
        if (!is_array($fields)) {
            $fields = $this->fragment($fields);
        }

        // Setting the fields to request
        $body = $this->request->getBody();
        foreach ($fields as $key => $value) {
            $body->setField($key, (string) $value);
        }

        // Make the request using guzzle
        return $this->call();
    }
final protected function post($resource, $fields)
    {
        // Initilize the request as post
        $this->init('post', $resource);

        // Is an object
        if (!is_array($fields)) {
            $fields = $this->fragment($fields);
        }

        // Setting the fields to request
        $body = $this->request->getBody();
        foreach ($fields as $key => $value) {
            $body->setField($key, (string) $value);
        }

        // Make the request using guzzle
        return $this->call();
    }
final protected function post ( $ resource , $ fields ) { // Initilize the request as post $ this -> init ( 'post' , $ resource ) ; // Is an object if ( ! is_array ( $ fields ) ) { $ fields = $ this -> fragment ( $ fields ) ; } // Setting the fields to request $ body = $ this -> request -> getBody ( ) ; foreach ( $ fields as $ key => $ value ) { $ body -> setField ( $ key , ( string ) $ value ) ; } // Make the request using guzzle return $ this -> call ( ) ; }
Send POST http request.

@param string $resource Resource to call eg. /users
@param mixed  $fields   Fields to send using post paramters

@return Response of the request
Send POST http request .