{"action":"opened","issue":{"url":"https://api.github.com/repos/magento/mtf/issues/26","repository_url":"https://api.github.com/repos/magento/mtf","labels_url":"https://api.github.com/repos/magento/mtf/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/magento/mtf/issues/26/comments","events_url":"https://api.github.com/repos/magento/mtf/issues/26/events","html_url":"https://github.com/magento/mtf/issues/26","id":152541552,"number":26,"title":"Handler: Curl Url","user":{"login":"naveenabt","id":18484648,"avatar_url":"https://avatars.githubusercontent.com/u/18484648?v=3","gravatar_id":"","url":"https://api.github.com/users/naveenabt","html_url":"https://github.com/naveenabt","followers_url":"https://api.github.com/users/naveenabt/followers","following_url":"https://api.github.com/users/naveenabt/following{/other_user}","gists_url":"https://api.github.com/users/naveenabt/gists{/gist_id}","starred_url":"https://api.github.com/users/naveenabt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/naveenabt/subscriptions","organizations_url":"https://api.github.com/users/naveenabt/orgs","repos_url":"https://api.github.com/users/naveenabt/repos","events_url":"https://api.github.com/users/naveenabt/events{/privacy}","received_events_url":"https://api.github.com/users/naveenabt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-02T12:13:47Z","updated_at":"2016-05-02T12:13:47Z","closed_at":null,"body":"Hi ,\r\n\r\nHow to create the curl url?\r\nBelow code i have referred from \"Customer Segment\" Module \r\n\r\nPath: CustomerSegment\\Handler\\Curl.php\r\n\r\n\r\n`public function persist(FixtureInterface $customerSegment = null)\r\n    {\r\n        /** @var CustomerSegment $customerSegment */\r\n        $url = $_ENV['app_backend_url'] . 'customersegment/index/save/back/edit/active_tab/general_section';\r\n        $curl = new BackendDecorator(new CurlTransport(), $this->_configuration);\r\n        $data = $this->replaceMappingData($customerSegment->getData());\r\n\r\n        if ($customerSegment->hasData('conditions_serialized')) {\r\n            $data['rule']['conditions'] = $this->prepareCondition($data['conditions_serialized']);\r\n            unset($data['conditions_serialized']);\r\n        }\r\n\r\n        $data['website_ids'] = $this->getWebsiteIdsValue($data['website_ids']);\r\n        $curl->write($url, $data);\r\n        $response = $curl->read();\r\n        $curl->close();\r\n        if (!strpos($response, 'data-ui-id=\"messages-message-success\"')) {\r\n            throw new \\Exception(\r\n                \"CustomerSegment entity creating by curl handler was not successful!\" . \" Response: $response\"\r\n            );\r\n        }\r\n\r\n        return ['segment_id' => $this->getCustomerSegmentId($response)];\r\n    }\r\n`\r\n\r\nAnd below code i have refferd from \"Tax Rate\" Module.\r\n\r\n` public function persist(FixtureInterface $fixture = null)\r\n    {\r\n        /** @var TaxRate $fixture */\r\n        $data = $this->prepareData($fixture);\r\n\r\n        $url = $_ENV['app_backend_url'] . 'tax/rate/ajaxSave/?isAjax=true';\r\n        $curl = new BackendDecorator(new CurlTransport(), $this->_configuration);\r\n        $curl->write($url, $data);\r\n        $response = $curl->read();\r\n        $curl->close();\r\n\r\n        $id = $this->getTaxRateId($response);\r\n        return ['id' => $id];\r\n    }`\r\n\r\nIn both module, url created in different way.\r\nHow to form the $url?\r\n\r\nThanks,"}}