protected function makeCurlBody() {
        $body = $this->body;

        if (is_string($body)) {
            return (string)$body;
        }

        $contentType = $this->getHeader('Content-Type');
        if (stripos($contentType, 'application/json') === 0) {
            $body = json_encode($body);
        }

        return $body;
    }
protected function makeCurlBody() {
        $body = $this->body;

        if (is_string($body)) {
            return (string)$body;
        }

        $contentType = $this->getHeader('Content-Type');
        if (stripos($contentType, 'application/json') === 0) {
            $body = json_encode($body);
        }

        return $body;
    }
protected function makeCurlBody ( ) { $ body = $ this -> body ; if ( is_string ( $ body ) ) { return ( string ) $ body ; } $ contentType = $ this -> getHeader ( 'Content-Type' ) ; if ( stripos ( $ contentType , 'application/json' ) === 0 ) { $ body = json_encode ( $ body ) ; } return $ body ; }
Convert the request body into a format suitable to be passed to curl.

@return string|array Returns the curl body.
Convert the request body into a format suitable to be passed to curl .