{"action":"closed","issue":{"url":"https://api.github.com/repos/skellock/apisauce/issues/29","repository_url":"https://api.github.com/repos/skellock/apisauce","labels_url":"https://api.github.com/repos/skellock/apisauce/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/skellock/apisauce/issues/29/comments","events_url":"https://api.github.com/repos/skellock/apisauce/issues/29/events","html_url":"https://github.com/skellock/apisauce/issues/29","id":176730900,"number":29,"title":"Send body as string","user":{"login":"maluramichael","id":1489383,"avatar_url":"https://avatars.githubusercontent.com/u/1489383?v=3","gravatar_id":"","url":"https://api.github.com/users/maluramichael","html_url":"https://github.com/maluramichael","followers_url":"https://api.github.com/users/maluramichael/followers","following_url":"https://api.github.com/users/maluramichael/following{/other_user}","gists_url":"https://api.github.com/users/maluramichael/gists{/gist_id}","starred_url":"https://api.github.com/users/maluramichael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maluramichael/subscriptions","organizations_url":"https://api.github.com/users/maluramichael/orgs","repos_url":"https://api.github.com/users/maluramichael/repos","events_url":"https://api.github.com/users/maluramichael/events{/privacy}","received_events_url":"https://api.github.com/users/maluramichael/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-13T19:39:55Z","updated_at":"2016-09-13T19:41:50Z","closed_at":"2016-09-13T19:41:50Z","body":"We got some weird api which requires the body of the POST request to be a string like this\r\n`username=xyz&password=abc`\r\nAnd the content type has to be \r\n\r\nI tried the following\r\n```javascript\r\nconst body = {username, password};\r\n// and \r\nconst body = `username=xyz&password=abc`;\r\nconst options = {\r\n\theaders: {\r\n\t\t'Accept'      : 'application/json',\r\n\t\t'Content-Type': 'application/x-www-form-urlencoded'\r\n\t}\r\n};\r\nreturn this.api.post('/tokenAuthentication/getToken.json', body, options);\r\n```\r\n\r\nIn both cases it didn't worked. How do i send a request with just a string?"}}
{"actor":{"display_login":"maluramichael"}}