{"action":"created","issue":{"url":"https://api.github.com/repos/yiisoft/yii2-httpclient/issues/71","repository_url":"https://api.github.com/repos/yiisoft/yii2-httpclient","labels_url":"https://api.github.com/repos/yiisoft/yii2-httpclient/issues/71/labels{/name}","comments_url":"https://api.github.com/repos/yiisoft/yii2-httpclient/issues/71/comments","events_url":"https://api.github.com/repos/yiisoft/yii2-httpclient/issues/71/events","html_url":"https://github.com/yiisoft/yii2-httpclient/issues/71","id":180757091,"number":71,"title":"setData param with $","user":{"login":"totpero","id":1710257,"avatar_url":"https://avatars.githubusercontent.com/u/1710257?v=3","gravatar_id":"","url":"https://api.github.com/users/totpero","html_url":"https://github.com/totpero","followers_url":"https://api.github.com/users/totpero/followers","following_url":"https://api.github.com/users/totpero/following{/other_user}","gists_url":"https://api.github.com/users/totpero/gists{/gist_id}","starred_url":"https://api.github.com/users/totpero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/totpero/subscriptions","organizations_url":"https://api.github.com/users/totpero/orgs","repos_url":"https://api.github.com/users/totpero/repos","events_url":"https://api.github.com/users/totpero/events{/privacy}","received_events_url":"https://api.github.com/users/totpero/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/yiisoft/yii2-httpclient/labels/bug","name":"bug","color":"e102d8"},{"url":"https://api.github.com/repos/yiisoft/yii2-httpclient/labels/status:to%20be%20verified","name":"status:to be verified","color":"fbca04"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/yiisoft/yii2-httpclient/milestones/4","html_url":"https://github.com/yiisoft/yii2-httpclient/milestones/2.0.2","labels_url":"https://api.github.com/repos/yiisoft/yii2-httpclient/milestones/4/labels","id":1936348,"number":4,"title":"2.0.2","description":null,"creator":{"login":"klimov-paul","id":1482054,"avatar_url":"https://avatars.githubusercontent.com/u/1482054?v=3","gravatar_id":"","url":"https://api.github.com/users/klimov-paul","html_url":"https://github.com/klimov-paul","followers_url":"https://api.github.com/users/klimov-paul/followers","following_url":"https://api.github.com/users/klimov-paul/following{/other_user}","gists_url":"https://api.github.com/users/klimov-paul/gists{/gist_id}","starred_url":"https://api.github.com/users/klimov-paul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klimov-paul/subscriptions","organizations_url":"https://api.github.com/users/klimov-paul/orgs","repos_url":"https://api.github.com/users/klimov-paul/repos","events_url":"https://api.github.com/users/klimov-paul/events{/privacy}","received_events_url":"https://api.github.com/users/klimov-paul/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":4,"state":"open","created_at":"2016-08-11T08:38:08Z","updated_at":"2016-10-04T10:40:08Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2016-10-03T21:54:44Z","updated_at":"2016-10-04T10:40:08Z","closed_at":"2016-10-04T10:40:08Z","body":"Hello,\r\n\r\nI try to access this URL: \r\n`http://www.nuget.org/api/v2/Search()?$filter=IsLatestVersion&$orderby=Id&$skip=0&$top=30&searchTerm='log4net'&targetFramework=''&includePrerelease=false`\r\n\r\nusing this piece of code:\r\n\r\n```\r\n$client = new Client(['baseUrl' => 'http://nuget.org/']);\r\n$response = $client->createRequest()\r\n\t->setFormat(Client::FORMAT_XML)\r\n\t->setUrl('api/v2/Search()')\r\n\t->setData([\r\n\t\t'$top' => '30',\r\n\t])\r\n\t->send();\r\n\r\n$responseData = $response->getData();\r\n```\r\nand i get this error:\r\n\r\n```\r\n<name>Exception</name>\r\n<message>Invalid Character Error</message>\r\n<code>5</code>\r\n<type>DOMException</type>\r\n<file>C:\\Program Files (x86)\\Ampps\\www\\app-update\\vendor\\yiisoft\\yii2-httpclient\\XmlFormatter.php</file>\r\n<line>104</line>\r\n<stack-trace>\r\n\t<item>#0 C:\\Program Files (x86)\\Ampps\\www\\app-update\\vendor\\yiisoft\\yii2-httpclient\\XmlFormatter.php(104): DOMElement->__construct('$top')</item>\r\n\t....\r\n```\r\n\r\nThe error is from `$` character because if i remove this works fine.\r\n"},"comment":{"url":"https://api.github.com/repos/yiisoft/yii2-httpclient/issues/comments/251354353","html_url":"https://github.com/yiisoft/yii2-httpclient/issues/71#issuecomment-251354353","issue_url":"https://api.github.com/repos/yiisoft/yii2-httpclient/issues/71","id":251354353,"user":{"login":"klimov-paul","id":1482054,"avatar_url":"https://avatars.githubusercontent.com/u/1482054?v=3","gravatar_id":"","url":"https://api.github.com/users/klimov-paul","html_url":"https://github.com/klimov-paul","followers_url":"https://api.github.com/users/klimov-paul/followers","following_url":"https://api.github.com/users/klimov-paul/following{/other_user}","gists_url":"https://api.github.com/users/klimov-paul/gists{/gist_id}","starred_url":"https://api.github.com/users/klimov-paul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klimov-paul/subscriptions","organizations_url":"https://api.github.com/users/klimov-paul/orgs","repos_url":"https://api.github.com/users/klimov-paul/repos","events_url":"https://api.github.com/users/klimov-paul/events{/privacy}","received_events_url":"https://api.github.com/users/klimov-paul/received_events","type":"User","site_admin":false},"created_at":"2016-10-04T10:40:08Z","updated_at":"2016-10-04T10:40:08Z","body":"XML document tags can not start from `$`, see:\r\nhttp://www.w3schools.com/xml/xml_elements.asp\r\n\r\nThus your request can not be packed in valid XML document. Current behavior is expected in this case and will not be changed.\r\n\r\n> I try to access this URL: \r\nhttp://www.nuget.org/api/v2/Search()?$filter=IsLatestVersion&$orderby=Id&$skip=0&$top=30&searchTerm='log4net'&targetFramework=''&includePrerelease=false\r\n\r\nWhy are you using XML format for the request then? Seems it should be regular URL encoded query string."}}
{"actor":{"display_login":"klimov-paul"}}