{"action":"created","issue":{"url":"https://api.github.com/repos/maximumG/piapi/issues/3","repository_url":"https://api.github.com/repos/maximumG/piapi","labels_url":"https://api.github.com/repos/maximumG/piapi/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/maximumG/piapi/issues/3/comments","events_url":"https://api.github.com/repos/maximumG/piapi/issues/3/events","html_url":"https://github.com/maximumG/piapi/issues/3","id":136424763,"number":3,"title":"request method fail with bulkImport","user":{"login":"clementtrebuchet","id":8559910,"avatar_url":"https://avatars.githubusercontent.com/u/8559910?v=3","gravatar_id":"","url":"https://api.github.com/users/clementtrebuchet","html_url":"https://github.com/clementtrebuchet","followers_url":"https://api.github.com/users/clementtrebuchet/followers","following_url":"https://api.github.com/users/clementtrebuchet/following{/other_user}","gists_url":"https://api.github.com/users/clementtrebuchet/gists{/gist_id}","starred_url":"https://api.github.com/users/clementtrebuchet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clementtrebuchet/subscriptions","organizations_url":"https://api.github.com/users/clementtrebuchet/orgs","repos_url":"https://api.github.com/users/clementtrebuchet/repos","events_url":"https://api.github.com/users/clementtrebuchet/events{/privacy}","received_events_url":"https://api.github.com/users/clementtrebuchet/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/maximumG/piapi/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"maximumG","id":4469833,"avatar_url":"https://avatars.githubusercontent.com/u/4469833?v=3","gravatar_id":"","url":"https://api.github.com/users/maximumG","html_url":"https://github.com/maximumG","followers_url":"https://api.github.com/users/maximumG/followers","following_url":"https://api.github.com/users/maximumG/following{/other_user}","gists_url":"https://api.github.com/users/maximumG/gists{/gist_id}","starred_url":"https://api.github.com/users/maximumG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maximumG/subscriptions","organizations_url":"https://api.github.com/users/maximumG/orgs","repos_url":"https://api.github.com/users/maximumG/repos","events_url":"https://api.github.com/users/maximumG/events{/privacy}","received_events_url":"https://api.github.com/users/maximumG/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2016-02-25T15:42:32Z","updated_at":"2016-04-27T18:28:54Z","closed_at":null,"body":"**_Calling_**\r\napi.request('bulkImport', params=json.dumps(data))\r\n\r\n**When making a PUT request on bulkImport **\r\nTraceback (most recent call last):\r\nDesktop/Code/inno1_configuration_manager/src/configuration_manager/core/provisionners/pr_con.py\", line 64, in <module>\r\n    PrimeCon(data=[{}], config=d)._update_api()\r\nDesktop/Code/inno1_configuration_manager/src/configuration_manager/core/provisionners/pr_con.py\", line 49, in _update_api\r\n2016-02-25 16:39:18,602 - requests.packages.urllib3.connectionpool - DEBUG - \"PUT /webacs/api/v1/op/devices/bulkImport.json HTTP/1.1\" 500 373\r\n    api.request('bulkImport', params=json.dumps(data))\r\n  File \"C:\\Python27\\lib\\site-packages\\piapi.py\", line 394, in request\r\n    return self.request_service(resource, params, timeout)\r\n  File \"C:\\Python27\\lib\\site-packages\\piapi.py\", line 354, in request_service\r\n    return self._parse(response)\r\n  File \"C:\\Python27\\lib\\site-packages\\piapi.py\", line 178, in _parse\r\n    raise PIAPIRequestError(\"An error has occured during the API invocation\")\r\npiapi.PIAPIRequestError: An error has occured during the API invocation\r\n\r\n**if i modify request_service method with**\r\nelif method == \"PUT\":\r\n            headers  = {\"Content-Type\": \"application/json; charset=UTF-8\"}\r\n            response = self.session.request(method, url, data=params, headers=headers, verify=self.verify,\r\n                                            timeout=timeout)\r\n**_then the request pass_**\r\n\r\n2016-02-25 16:43:59,295 - requests.packages.urllib3.connectionpool - DEBUG - \"PUT /webacs/api/v1/op/devices/bulkImport.json HTTP/1.1\" 200 313"},"comment":{"url":"https://api.github.com/repos/maximumG/piapi/issues/comments/215183148","html_url":"https://github.com/maximumG/piapi/issues/3#issuecomment-215183148","issue_url":"https://api.github.com/repos/maximumG/piapi/issues/3","id":215183148,"user":{"login":"maximumG","id":4469833,"avatar_url":"https://avatars.githubusercontent.com/u/4469833?v=3","gravatar_id":"","url":"https://api.github.com/users/maximumG","html_url":"https://github.com/maximumG","followers_url":"https://api.github.com/users/maximumG/followers","following_url":"https://api.github.com/users/maximumG/following{/other_user}","gists_url":"https://api.github.com/users/maximumG/gists{/gist_id}","starred_url":"https://api.github.com/users/maximumG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maximumG/subscriptions","organizations_url":"https://api.github.com/users/maximumG/orgs","repos_url":"https://api.github.com/users/maximumG/repos","events_url":"https://api.github.com/users/maximumG/events{/privacy}","received_events_url":"https://api.github.com/users/maximumG/received_events","type":"User","site_admin":false},"created_at":"2016-04-27T18:28:54Z","updated_at":"2016-04-27T18:28:54Z","body":"Great to see that some folks are contributing to the library 👍 .\r\n\r\n@baileytj3 : would it be possible to create a merge request with your changes ? thanks"}}