@param       $body

@return false|Url
966211
public function url($body)
    {
        $re = '/window.location(\.assign|\.replace)\(["|\'](.+)["|\']/i';
        preg_match_all($re, $body, $matches);

        if (!empty($matches[2])) {
            return new Url($matches[2][0], true);
        }

        return false;
    }
855565
public function setBody($body, $html = false)
    {
        if ($html) {
            $this->body['text/html'] = $body;
            $body = strip_tags($body);
        }
        
        $this->body['text/plain'] = $body;
        
        return $this;
    }
254331
protected function parseLockRequest($body)
    {
        $result = $this->server->xml->expect(
            '{DAV:}lockinfo',
            $body
        );

        $lockInfo = new LockInfo();

        $lockInfo->owner = $result->owner;
        $lockInfo->token = DAV\UUIDUtil::getUUID();
        $lockInfo->scope = $result->scope;

        return $lockInfo;
    }
1263564
private function createJsonBody(&$body) 
    {
        if ($body && $this->method != self::GET) {
            return GuzzleHttp\json_encode($body);
        }
        
        return;
    }
548822
protected function getProviders($body = '')
    {
        $regex = ($this->config['use_embed_prefix'] === true ? $this->urlEmbedRegex : $this->urlRegex);
        if (is_array($body)) {

            $body = array_filter($body, function ($arr) use ($regex) {
                return preg_match($regex, $arr);
            });

            $services = $this->providers->getAll($body);
        } elseif (preg_match_all($regex, $body, $matches)) {
            $services = $this->providers->getAll($matches['0']);
        } else {
            return array();
        }

        return $this->clean($services);
    }
735045
public function addBody($body)
    {
        Assert::stringNotEmpty($body, 'The method body must be a non-empty string. Got: %s');

        if ($this->body) {
            $this->body .= "\n".$body;
        } else {
            $this->body = $body;
        }

        return $this;
    }
1345982
private function parse($body)
    {
        $response = array();
        $xml = new \SimpleXMLElement($body);

        foreach ($xml as $name => $value) {
            $k = str_replace('eway', '', $name);
            $response[$k] = (string) $value;
        }

        return $response;
    }
1042585
public static function link($url, $body = null, $attribs = array())
    {
        $body = (is_null($body)) ? $url : $body;
        $attribs['href'] = $url;
        return self::tag('a', $body, $attribs);
    }
1332776
private function encodePostBody($body) {
        if ($body === null) {
            return '';
        }
        
        if (! is_array($body)) {
            return urlencode(strval($body));
        }
        
        $result = array ();
        foreach ( $body as $k => $v ) {
            $result [ ] = urlencode($k) . '=' . urlencode($v);
        }
        
        return join('&', $result);
    }
437330
protected function _encode($body) {
		$media = $this->_classes['media'];

		if ($media::type($this->_type)) {
			$encoded = $media::encode($this->_type, $body);
			$body = $encoded !== null ? $encoded : $body;
		}
		return $body;
	}
820147
public function getInlinedHtml($body)
    {
        $inliner = new \TijsVerkoyen\CssToInlineStyles\CssToInlineStyles;
        $inliner->setHtml($body);
        $inliner->setUseInlineStylesBlock();
        return $inliner->convert();
    }
668929
public function createStream($body = null)
    {
        if ($body instanceof StreamInterface)
        {
            return $body;
        }

        if (\is_resource($body))
        {
            return Stream::createFromResource($body);
        }

        return Stream::create($body ?? '');
    }
1255597
public function _parse($body)
    {
        // If the user decided to forgo the automatic
        // smart parsing, short circuit.
        if (!$this->request->auto_parse) {
            return $body;
        }

        // If provided, use custom parsing callback
        if (isset($this->request->parse_callback)) {
            return call_user_func($this->request->parse_callback, $body);
        }

        // Decide how to parse the body of the response in the following order
        //  1. If provided, use the mime type specifically set as part of the `Request`
        //  2. If a MimeHandler is registered for the content type, use it
        //  3. If provided, use the "parent type" of the mime type from the response
        //  4. Default to the content-type provided in the response
        $parse_with = $this->request->expected_type;
        if (empty($this->request->expected_type)) {
            $parse_with = Httpful::hasParserRegistered($this->content_type)
                ? $this->content_type
                : $this->parent_type;
        }

       return Httpful::get($parse_with)->parse($body);
    }
567613
public function activate($xmlBody = false)
    {
        $this->request($this->dataciteUrl . 'metadata/', $xmlBody);

        return $this->hasError() ? false : true;
    }
425809
public static function resolve_base($body)
    {
        // check for <base href=...>
        if (preg_match('!(<base.*href=["\']?)([hftps]{3,5}://[a-z0-9/.%-]+)!i', $body, $regs)) {
            $replacer = new rcube_base_replacer($regs[2]);
            $body     = $replacer->replace($body);
        }

        return $body;
    }
1318362
public function setBody($body)
    {
        $node = $this->getBody(false);
        if(!$node){
            $node = $this->createElement('body');
            $this->doc->appendChild($node);
        }
        $node->nodeValue = htmlspecialchars($body);
    }
1307085
public function setBody($body) : Response
    {
        if (is_null($body) || is_scalar($body)) {
            $this->body = (string) $body;

            return $this;
        }

        $prefix = 'Body must be null or scalar, ';
        $suffix = gettype($body) . ' given.';

        throw new \InvalidArgumentException("{$prefix}{$suffix}");
    }