/** * @inheritdoc */ public function parse(Response $response) { return $this->convertXmlToArray($response->getContent()); }
/** * Creates a response instance. * @param string $content raw content * @param array $headers headers list. * @return Response request instance. */ public function createResponse($content = null, array $headers = []) { $config = $this->responseConfig; if (!isset($config['class'])) { $config['class'] = Response::className(); } $config['client'] = $this; $response = Yii::createObject($config); $response->setContent($content); $response->setHeaders($headers); return $response; }
/** * @inheritdoc */ public function parse(Response $response) { $data = []; parse_str($response->getContent(), $data); return $data; }
/** * @inheritdoc */ public function parse(Response $response) { return Json::decode($response->getContent()); }
/** * @inheritdoc */ public function parse(Response $response) { return $response->getContent(); }