public function postJson($path, $postBody = null, array $parameters = [], $headers = [])
    {
        if (is_array($postBody)) {
            $postBody = json_encode($postBody);
        }

        return $this->post($path, $postBody, $parameters, $headers);
    }
public function postJson($path, $postBody = null, array $parameters = [], $headers = [])
    {
        if (is_array($postBody)) {
            $postBody = json_encode($postBody);
        }

        return $this->post($path, $postBody, $parameters, $headers);
    }
public function postJson ( $ path , $ postBody = null , array $ parameters = [ ] , $ headers = [ ] ) { if ( is_array ( $ postBody ) ) { $ postBody = json_encode ( $ postBody ) ; } return $ this -> post ( $ path , $ postBody , $ parameters , $ headers ) ; }
Send a POST request but json_encode the post body in the request

@param  string $path
@param  mixed  $postBody
@param  array  $parameters
@param  array  $headers
@return mixed
Send a POST request but json_encode the post body in the request