/** * Request Xml Body */ public function withXmlBody(array $body) { $this->body = Serializer::xmlEncode($body); return $this; }
/** * 构造方法 */ public function __construct(array $options, array $headers = array(), $status = 200) { $content = Serializer::xmlEncode($options); $headers = array_replace($headers, array('Content-Type' => 'application/xml')); parent::__construct($content, $status, $headers); }