public function postItem(string $dataset) : array
    {
        try {
            $entry = $this->di->get("request")->getBodyAsJson();
        } catch (\Anax\Request\Exception $e) {
            return [
                ["message" => "500. HTTP request body is not an object/array or valid JSON."],
                500
            ];
        }

        $item = $this->di->get("remserver")->addItem($dataset, $entry);
        return [$item];
    }
public function postItem(string $dataset) : array
    {
        try {
            $entry = $this->di->get("request")->getBodyAsJson();
        } catch (\Anax\Request\Exception $e) {
            return [
                ["message" => "500. HTTP request body is not an object/array or valid JSON."],
                500
            ];
        }

        $item = $this->di->get("remserver")->addItem($dataset, $entry);
        return [$item];
    }
public function postItem ( string $ dataset ) : array { try { $ entry = $ this -> di -> get ( "request" ) -> getBodyAsJson ( ) ; } catch ( \ Anax \ Request \ Exception $ e ) { return [ [ "message" => "500. HTTP request body is not an object/array or valid JSON." ] , 500 ] ; } $ item = $ this -> di -> get ( "remserver" ) -> addItem ( $ dataset , $ entry ) ; return [ $ item ] ; }
Create a new item by getting the entry from the request body and add
to the dataset.

@param string $dataset identifier for the dataset

@return array
Create a new item by getting the entry from the request body and add to the dataset .