src/Util/LTI.php
public static function sendJSONBody($method, $postBody, $content_type,
            $rest_url, $key_key, $secret, &$debug_log=false, $signature=false)
    {
        if ( is_array($debug_log) ) $debug_log[] = array('Sending '.strlen($postBody).' bytes to rest_url='.$rest_url);

        $more_headers = false;
        $response = self::sendOAuthBody($method, $rest_url, $key_key,
            $secret, $content_type, $postBody);

        if ( is_array($debug_log) )  $debug_log[] = array('Caliper JSON Response',$response);

        global $LastOAuthBodyBaseString;
        $lbs = $LastOAuthBodyBaseString;
        if ( is_array($debug_log) )  $debug_log[] = array('Our base string',$lbs);

        return true;
    }
public static function sendJSONBody($method, $postBody, $content_type,
            $rest_url, $key_key, $secret, &$debug_log=false, $signature=false)
    {
        if ( is_array($debug_log) ) $debug_log[] = array('Sending '.strlen($postBody).' bytes to rest_url='.$rest_url);

        $more_headers = false;
        $response = self::sendOAuthBody($method, $rest_url, $key_key,
            $secret, $content_type, $postBody);

        if ( is_array($debug_log) )  $debug_log[] = array('Caliper JSON Response',$response);

        global $LastOAuthBodyBaseString;
        $lbs = $LastOAuthBodyBaseString;
        if ( is_array($debug_log) )  $debug_log[] = array('Our base string',$lbs);

        return true;
    }
public static function sendJSONBody ( $ method , $ postBody , $ content_type , $ rest_url , $ key_key , $ secret , & $ debug_log = false , $ signature = false ) { if ( is_array ( $ debug_log ) ) $ debug_log [ ] = array ( 'Sending ' . strlen ( $ postBody ) . ' bytes to rest_url=' . $ rest_url ) ; $ more_headers = false ; $ response = self :: sendOAuthBody ( $ method , $ rest_url , $ key_key , $ secret , $ content_type , $ postBody ) ; if ( is_array ( $ debug_log ) ) $ debug_log [ ] = array ( 'Caliper JSON Response' , $ response ) ; global $ LastOAuthBodyBaseString ; $ lbs = $ LastOAuthBodyBaseString ; if ( is_array ( $ debug_log ) ) $ debug_log [ ] = array ( 'Our base string' , $ lbs ) ; return true ; }
Send a JSON body LTI 2.x Style

@param debug_log This can either be false or an empty array.  If
this is an array, it is filled with data as the steps progress.
Each step is an array with a string message as the first element
and optional debug detail (i.e. like a post body) as the second
element.

@return mixed If things go well this returns true.
If this goes badly, this returns a string with an error message.
Send a JSON body LTI 2 . x Style