src/GetContents.php
public function getPostBody()
    {
        $output = '';
        if ($this->isJson) {
            $jsonPretty = ($this->isJsonPretty ? JSON_PRETTY_PRINT : NULL);
            if (count($this->data) > 0) {
                $output = json_encode($this->data, $jsonPretty);
            }
        } elseif ($this->isXML) {
            $output = $this->data;
        } elseif (count($this->data) > 0) {
            $output = http_build_query($this->data);
        }

        return $output;
    }
public function getPostBody()
    {
        $output = '';
        if ($this->isJson) {
            $jsonPretty = ($this->isJsonPretty ? JSON_PRETTY_PRINT : NULL);
            if (count($this->data) > 0) {
                $output = json_encode($this->data, $jsonPretty);
            }
        } elseif ($this->isXML) {
            $output = $this->data;
        } elseif (count($this->data) > 0) {
            $output = http_build_query($this->data);
        }

        return $output;
    }
public function getPostBody ( ) { $ output = '' ; if ( $ this -> isJson ) { $ jsonPretty = ( $ this -> isJsonPretty ? JSON_PRETTY_PRINT : NULL ) ; if ( count ( $ this -> data ) > 0 ) { $ output = json_encode ( $ this -> data , $ jsonPretty ) ; } } elseif ( $ this -> isXML ) { $ output = $ this -> data ; } elseif ( count ( $ this -> data ) > 0 ) { $ output = http_build_query ( $ this -> data ) ; } return $ output ; }
Get the post body - either JSON encoded or ready to be sent as a form post

@author: 713uk13m <dev@nguyenanhung.com>
@time  : 10/7/18 02:19

@return array|false|string Data to be sent Request
Get the post body - either JSON encoded or ready to be sent as a form post