{"action":"opened","issue":{"url":"https://api.github.com/repos/svanoort/pyresttest/issues/115","labels_url":"https://api.github.com/repos/svanoort/pyresttest/issues/115/labels{/name}","comments_url":"https://api.github.com/repos/svanoort/pyresttest/issues/115/comments","events_url":"https://api.github.com/repos/svanoort/pyresttest/issues/115/events","html_url":"https://github.com/svanoort/pyresttest/issues/115","id":119675167,"number":115,"title":"POST request with non JSON content type data","user":{"login":"ribeaud","id":13186156,"avatar_url":"https://avatars.githubusercontent.com/u/13186156?v=3","gravatar_id":"","url":"https://api.github.com/users/ribeaud","html_url":"https://github.com/ribeaud","followers_url":"https://api.github.com/users/ribeaud/followers","following_url":"https://api.github.com/users/ribeaud/following{/other_user}","gists_url":"https://api.github.com/users/ribeaud/gists{/gist_id}","starred_url":"https://api.github.com/users/ribeaud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ribeaud/subscriptions","organizations_url":"https://api.github.com/users/ribeaud/orgs","repos_url":"https://api.github.com/users/ribeaud/repos","events_url":"https://api.github.com/users/ribeaud/events{/privacy}","received_events_url":"https://api.github.com/users/ribeaud/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-01T09:27:36Z","updated_at":"2015-12-01T09:27:36Z","closed_at":null,"body":"It seems that the interface I am interacting with does NOT support content type **application/json** for `POST` requests. After a brief analysis, I got the impression that it is NOT possible to submit *data* to `POST` requests in a format different than **application/json**. Am I right?\r\nYou submit data via:\r\n```\r\ncurl.setopt(curl.READFUNCTION, StringIO(bod).read)\r\n```\r\nand NOT via:\r\n```\r\n curl.setopt(pycurl.POSTFIELDS, urlencode(body))\r\n```\r\nalthough it is possible to specify a `dict` as *body* structure. It would be nice if we have more flexibility here. I will pull a request after having made the corresponding changes."}}