{"action":"opened","issue":{"url":"https://api.github.com/repos/aurelia/http-client/issues/107","labels_url":"https://api.github.com/repos/aurelia/http-client/issues/107/labels{/name}","comments_url":"https://api.github.com/repos/aurelia/http-client/issues/107/comments","events_url":"https://api.github.com/repos/aurelia/http-client/issues/107/events","html_url":"https://github.com/aurelia/http-client/issues/107","id":111455796,"number":107,"title":"File upload support","user":{"login":"giovannicandido","id":915892,"avatar_url":"https://avatars.githubusercontent.com/u/915892?v=3","gravatar_id":"","url":"https://api.github.com/users/giovannicandido","html_url":"https://github.com/giovannicandido","followers_url":"https://api.github.com/users/giovannicandido/followers","following_url":"https://api.github.com/users/giovannicandido/following{/other_user}","gists_url":"https://api.github.com/users/giovannicandido/gists{/gist_id}","starred_url":"https://api.github.com/users/giovannicandido/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giovannicandido/subscriptions","organizations_url":"https://api.github.com/users/giovannicandido/orgs","repos_url":"https://api.github.com/users/giovannicandido/repos","events_url":"https://api.github.com/users/giovannicandido/events{/privacy}","received_events_url":"https://api.github.com/users/giovannicandido/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-14T18:03:07Z","updated_at":"2015-10-14T18:03:07Z","closed_at":null,"body":"Hi, \r\nThe code:\r\n\r\n```\r\nlet uploadFile = $(\"#upload\");\r\n        let file = document.getElementById(\"uploadFile\").files[0];\r\n        let formData = new FormData()\r\n        formData.append(\"file\", file);\r\n\r\n        this.http.createRequest(\"rest/importar/upload\").asPost().withContent(formData).send()\r\n```\r\nSend the file with a *content-type*  of *application/json* when the right content type is dynamic added by the XMLHttpRequest with some random file delimiter, like the one: \r\n```\r\n    Content-Type: multipart/form-data; boundary=-----------------------------19101785007078931451097574330\r\n```"}}