Takes a transformed body and turns it into the raw body string needed for the mime encoding.

@param $transformedBody
433367
final public function setTransformedBody($transformedBody)
    {
        $encoding = (isset($this->headers["Content-Transfer-Encoding"])) ? $this->headers["Content-Transfer-Encoding"] : "";

        switch ($encoding) {
            case "quoted-printable":
                $this->setRawBody(quoted_printable_encode($transformedBody));
                break;
            case "base64":
                $this->setRawBody(chunk_split(base64_encode($transformedBody), 76));
                break;
            default:
                $this->setRawBody($transformedBody);
        }
    }
906980
public function setBody($body)
    {
        if(null!==$body && !is_object($body) && !is_string($body) && !is_callable($body) && !is_a($body, \Iterator::class))
        {
            return $this;
        }

        $this->options['body'] = $body;
        return $this;
    }
122741
private function formatBody()
    {
        $body = [];

        if (!empty($this->files)) {
            $data = [];

            if(!is_null($this->serialized_payload)) {
                collect($this->serialized_payload)->each(function($value, $key) use (&$data) {
                    $data[] = [
                        'name'     => $key,
                        'contents' => $value,
                    ];
                });
            }

            $body['multipart'] = array_merge($this->files, $data);

            return $body;
        }

        if ($this->content_type == Mime::JSON) {
            $body['json'] = $this->serialized_payload;
        } elseif ($this->method == Http::GET) {
            $body['query'] = $this->serialized_payload;
        } elseif (is_array($this->serialized_payload)) {
            $body['form_params'] = $this->serialized_payload;
        } else {
            $body['body'] = $this->serialized_payload;
        }

        return $body;
    }
794113
public static function normalize($body, $method)
    {
        if ($method === RequestInterface::METHOD_HEAD || empty($body)) {
            return;
        }

        if (is_callable($body)) {
            return call_user_func($body);
        }

        return $body;
    }
1060127
protected function makeBody( $params ):?string
	{
		if( is_null( $params ) ) return null;

		return $this->achieveSerializer( $this->request_content_type )->encode( $params );
	}
306158
protected static function _disassembleMime($body, $boundary)
    {
        $start = 0;
        $res = array();
        // find every mime part limiter and cut out the
        // string before it.
        // the part before the first boundary string is discarded:
        $p = strpos($body, '--'.$boundary."\n", $start);
        if ($p === false) {
            // no parts found!
            return array();
        }

        // position after first boundary line
        $start = $p + 3 + strlen($boundary);

        while (($p = strpos($body, '--' . $boundary . "\n", $start)) !== false) {
            $res[] = substr($body, $start, $p-$start);
            $start = $p + 3 + strlen($boundary);
        }

        // no more parts, find end boundary
        $p = strpos($body, '--' . $boundary . '--', $start);
        if ($p===false) {
            throw new Zend_Exception('Not a valid Mime Message: End Missing');
        }

        // the remaining part also needs to be parsed:
        $res[] = substr($body, $start, $p-$start);
        return $res;
    }
1334235
public function setBody($body = null)
    {
        if (is_object($body)) {
            $body = (string) $body;
        }

        $this->data['body'] = $body;
        return $this;
    }
1104210
private static function bodyToText(\Google_Service_Gmail_MessagePartBody $body = null): string
    {
        $sanitizedData = strtr($body->getData(), '-_', '+/');

        // On fail base64_decode returns false.
        // We can't know with certainty that getData() is ok.
        // So fail gracefully.
        return base64_decode($sanitizedData) ?? '';
    }
397455
public function setRawBody($rawBody)
    {
        $body = new MemoryStream();
        $body->write($rawBody);
        $this->setBody($body);
    }
1341754
public function withParsedBody($parsedBody): self
    {
        $request = clone $this;
        $request->parsedBody = $this->filterParsedBody($parsedBody);
        return $request;
    }
163728
public function print_raw_body($uid, $formatted = true)
    {
        if (!$this->check_connection()) {
            return;
        }

        $this->conn->handlePartBody($this->folder, $uid, true, null, null, true, null, $formatted);
    }
820904
public function setBody($body, $content_type = false){
	
		// clear old body data
		$this->post->clear();
		$this->files->clear();
		
		// is this form data?
		if(is_array($body)){
			$body = http_build_query($body);
		}
		
		$this->body = (string)$body;
		
		// plain text should be: text/plain; charset=UTF-8
		if($content_type){
			$this->headers->set('content-type', $content_type);
		}
		
		// do it!
		$this->prepare();
	}
695685
public function transform($body = null)
    {
        $providers = array();
        if ($urls = $this->embera->getUrlInfo($body)) {

            foreach ($urls as $url => $data) {
                if (!$this->allowOffline && (int) $data['embera_using_fake'] === 1) {
                    $this->errors[] = 'Using fake oembed response on ' . $url;
                    continue;
                }

                $providers[$url] = $this->replace($data, $this->template);
            }
        }

        if (is_array($body)) {
            $return = implode('', $providers);
        } else {
            $return = str_replace(array_keys($providers), array_values($providers), $body);
        }

        // Remove unchanged placeholders
        return preg_replace('~{([\w\d\-_]+)}~i', '', $return);
    }
279257
public function setBody($file, $body)
	{
		if(array_pop(explode('.', $file)) == 'markdown')
			return Markdown::defaultTransform($body);
		else
			return $body;
	}
847754
function getBodyAsBuffer(body, encoding) {
  return body instanceof Buffer
    ? body
    : Buffer.from(`${body || ''}`, normalizeBodyEncoding(encoding));
}
1285919
public function setBody($body = null)
    {
        if ($body instanceof HttpBody) {
            $this->body = $body;
        } else {
            $this->body->setContent($body);
        }
        return $this->body;
    }
1250770
public void setBody(String body)
    {
    	String xbody = body;
    	String [] row = xbody.split("\n");
    	for(int i=0; i<row.length; i++){
    		this.m_xbody.add(row[i]);
    	}
    }