/** * Post request for creating url rewrite * * @param FixtureInterface $fixture * @throws \Exception * @return void */ public function persist(FixtureInterface $fixture = null) { $url = $_ENV['app_backend_url'] . $this->url . $fixture->getTargetPath(); $data = $this->replaceMappingData($fixture->getData()); $curl = new BackendDecorator(new CurlTransport(), $this->_configuration); $curl->write(CurlInterface::POST, $url, '1.0', [], $data); $response = $curl->read(); if (!strpos($response, 'data-ui-id="messages-message-success"')) { throw new \Exception("URL Rewrite creation by curl handler was not successful! Response: {$response}"); } $curl->close(); }