{"action":"created","issue":{"url":"https://api.github.com/repos/Alamofire/Alamofire/issues/1617","repository_url":"https://api.github.com/repos/Alamofire/Alamofire","labels_url":"https://api.github.com/repos/Alamofire/Alamofire/issues/1617/labels{/name}","comments_url":"https://api.github.com/repos/Alamofire/Alamofire/issues/1617/comments","events_url":"https://api.github.com/repos/Alamofire/Alamofire/issues/1617/events","html_url":"https://github.com/Alamofire/Alamofire/issues/1617","id":179109164,"number":1617,"title":"Parameter  to Data","user":{"login":"it99ts","id":20577394,"avatar_url":"https://avatars.githubusercontent.com/u/20577394?v=3","gravatar_id":"","url":"https://api.github.com/users/it99ts","html_url":"https://github.com/it99ts","followers_url":"https://api.github.com/users/it99ts/followers","following_url":"https://api.github.com/users/it99ts/following{/other_user}","gists_url":"https://api.github.com/users/it99ts/gists{/gist_id}","starred_url":"https://api.github.com/users/it99ts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/it99ts/subscriptions","organizations_url":"https://api.github.com/users/it99ts/orgs","repos_url":"https://api.github.com/users/it99ts/repos","events_url":"https://api.github.com/users/it99ts/events{/privacy}","received_events_url":"https://api.github.com/users/it99ts/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Alamofire/Alamofire/labels/needs%20feedback","name":"needs feedback","color":"9559F0"},{"url":"https://api.github.com/repos/Alamofire/Alamofire/labels/support","name":"support","color":"FC6808"}],"state":"closed","locked":false,"assignee":{"login":"jshier","id":51020,"avatar_url":"https://avatars.githubusercontent.com/u/51020?v=3","gravatar_id":"","url":"https://api.github.com/users/jshier","html_url":"https://github.com/jshier","followers_url":"https://api.github.com/users/jshier/followers","following_url":"https://api.github.com/users/jshier/following{/other_user}","gists_url":"https://api.github.com/users/jshier/gists{/gist_id}","starred_url":"https://api.github.com/users/jshier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jshier/subscriptions","organizations_url":"https://api.github.com/users/jshier/orgs","repos_url":"https://api.github.com/users/jshier/repos","events_url":"https://api.github.com/users/jshier/events{/privacy}","received_events_url":"https://api.github.com/users/jshier/received_events","type":"User","site_admin":false},"assignees":[{"login":"jshier","id":51020,"avatar_url":"https://avatars.githubusercontent.com/u/51020?v=3","gravatar_id":"","url":"https://api.github.com/users/jshier","html_url":"https://github.com/jshier","followers_url":"https://api.github.com/users/jshier/followers","following_url":"https://api.github.com/users/jshier/following{/other_user}","gists_url":"https://api.github.com/users/jshier/gists{/gist_id}","starred_url":"https://api.github.com/users/jshier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jshier/subscriptions","organizations_url":"https://api.github.com/users/jshier/orgs","repos_url":"https://api.github.com/users/jshier/repos","events_url":"https://api.github.com/users/jshier/events{/privacy}","received_events_url":"https://api.github.com/users/jshier/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2016-09-25T21:11:06Z","updated_at":"2016-09-27T14:24:58Z","closed_at":"2016-09-27T14:24:58Z","body":"Hello - I have spent the whole weekend trying to sort out this problem. What I want to do is to convert the Parameter object into a Data object. The code I have at the moment is: \r\n\r\n`let url = URL(string: urlString)!`\r\n`let urlRequest = URLRequest(url: url)`\r\n`let encodedURLRequest = try JSONEncoding.default.encode(urlRequest, with: parameters)`     \r\n`let data = encodedURLRequest.httpBody`\r\n\r\n\r\n\r\nI want to use this data object in Alamofire.upload"},"comment":{"url":"https://api.github.com/repos/Alamofire/Alamofire/issues/comments/249880567","html_url":"https://github.com/Alamofire/Alamofire/issues/1617#issuecomment-249880567","issue_url":"https://api.github.com/repos/Alamofire/Alamofire/issues/1617","id":249880567,"user":{"login":"cnoon","id":169110,"avatar_url":"https://avatars.githubusercontent.com/u/169110?v=3","gravatar_id":"","url":"https://api.github.com/users/cnoon","html_url":"https://github.com/cnoon","followers_url":"https://api.github.com/users/cnoon/followers","following_url":"https://api.github.com/users/cnoon/following{/other_user}","gists_url":"https://api.github.com/users/cnoon/gists{/gist_id}","starred_url":"https://api.github.com/users/cnoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cnoon/subscriptions","organizations_url":"https://api.github.com/users/cnoon/orgs","repos_url":"https://api.github.com/users/cnoon/repos","events_url":"https://api.github.com/users/cnoon/events{/privacy}","received_events_url":"https://api.github.com/users/cnoon/received_events","type":"User","site_admin":false},"created_at":"2016-09-27T14:24:58Z","updated_at":"2016-09-27T14:24:58Z","body":"I agree with @jshier, you should use `JSONSerialization` @it99ts. If you continue to have issues, please open a question on [Stack Overflow](https://stackoverflow.com).\r\n\r\nBest of luck! 🍻\r\n\r\n---\r\n\r\nFrom our [Contribution Guidelines](https://github.com/Alamofire/Alamofire/blob/master/CONTRIBUTING.md)\r\n\r\n## Asking Questions\r\n\r\nWe don't use GitHub as a support forum. For any usage questions that are not specific to the project itself, please ask on [Stack Overflow](https://stackoverflow.com) instead. By doing so, you'll be more likely to quickly solve your problem, and you'll allow anyone else with the same question to find the answer. This also allows maintainers to focus on improving the project for others."}}
{"actor":{"display_login":"cnoon"}}