{"action":"created","issue":{"url":"https://api.github.com/repos/ikod/dlang-requests/issues/6","repository_url":"https://api.github.com/repos/ikod/dlang-requests","labels_url":"https://api.github.com/repos/ikod/dlang-requests/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/ikod/dlang-requests/issues/6/comments","events_url":"https://api.github.com/repos/ikod/dlang-requests/issues/6/events","html_url":"https://github.com/ikod/dlang-requests/issues/6","id":153020588,"number":6,"title":"Не получается отправить объект JSON","user":{"login":"bubnenkoff","id":6514326,"avatar_url":"https://avatars.githubusercontent.com/u/6514326?v=3","gravatar_id":"","url":"https://api.github.com/users/bubnenkoff","html_url":"https://github.com/bubnenkoff","followers_url":"https://api.github.com/users/bubnenkoff/followers","following_url":"https://api.github.com/users/bubnenkoff/following{/other_user}","gists_url":"https://api.github.com/users/bubnenkoff/gists{/gist_id}","starred_url":"https://api.github.com/users/bubnenkoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bubnenkoff/subscriptions","organizations_url":"https://api.github.com/users/bubnenkoff/orgs","repos_url":"https://api.github.com/users/bubnenkoff/repos","events_url":"https://api.github.com/users/bubnenkoff/events{/privacy}","received_events_url":"https://api.github.com/users/bubnenkoff/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":26,"created_at":"2016-05-04T14:06:13Z","updated_at":"2016-05-04T18:40:22Z","closed_at":null,"body":"```\r\nvoid sendQuestionsToArangoDB(Json questions)\r\n{\r\n    string collectionUrl = \"http://localhost:8529/_db/onlinetest/_api/document/?collection=sitetestanswers\";\r\n    auto rq = Request();\r\n    rq.verbosity = 2;\r\n    string s = `{\"test\":\"some value111\"}`;\r\n    auto rs = rq.post(collectionUrl, s, \"application/json\");\r\n    writeln(s);\r\n    writeln(\"SENDED\");\r\n\r\n\r\n}\r\n```\r\nСтоит вместо: `s` отправить `questions`. Во первых не компилится:\r\nC:\\Users\\bubenkov_di\\AppData\\Roaming\\dub\\packages\\requests-0.1.0\\requests\\source\\requests\\http.d(1212,27): Error: template requests.http.Request.exec cannot deduce function from argument types !(\"POST\")(string, Json, string), candidates are:\r\n\r\nВо вторых если в `to!string` сделать, то вылетает ошибка:\r\n\r\n```\r\n> POST /_db/onlinetest/_api/document/?collection=sitetestanswers HTTP/1.1\r\n> Content-Length: 2941\r\n> Connection: Close\r\n> Host: localhost:8529\r\n> Content-Type: application/json\r\n>\r\n< HTTP/1.1 400 Bad Request\r\n< Server: ArangoDB\r\n< Connection: Close\r\n< Content-Type: application/json; charset=utf-8\r\n< Content-Length: 80\r\n< 80 bytes of body received\r\nSENDED\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/ikod/dlang-requests/issues/comments/216960846","html_url":"https://github.com/ikod/dlang-requests/issues/6#issuecomment-216960846","issue_url":"https://api.github.com/repos/ikod/dlang-requests/issues/6","id":216960846,"user":{"login":"bubnenkoff","id":6514326,"avatar_url":"https://avatars.githubusercontent.com/u/6514326?v=3","gravatar_id":"","url":"https://api.github.com/users/bubnenkoff","html_url":"https://github.com/bubnenkoff","followers_url":"https://api.github.com/users/bubnenkoff/followers","following_url":"https://api.github.com/users/bubnenkoff/following{/other_user}","gists_url":"https://api.github.com/users/bubnenkoff/gists{/gist_id}","starred_url":"https://api.github.com/users/bubnenkoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bubnenkoff/subscriptions","organizations_url":"https://api.github.com/users/bubnenkoff/orgs","repos_url":"https://api.github.com/users/bubnenkoff/repos","events_url":"https://api.github.com/users/bubnenkoff/events{/privacy}","received_events_url":"https://api.github.com/users/bubnenkoff/received_events","type":"User","site_admin":false},"created_at":"2016-05-04T18:40:22Z","updated_at":"2016-05-04T18:40:22Z","body":"Не вставляется:\r\n    string s = `{\"id\":\"1\",\"question\":\"вопрос?\"},{\"id\":2}`;\r\n\r\nВставляется:\r\n    string s = `{\"id\":\"1\",\"question\":\"вопрос?\"}`;\r\n\r\n%)\r\n\r\nНет идей почему так может быть то?"}}