{"action":"created","comment":{"url":"https://api.github.com/repos/Alamofire/Alamofire/pulls/comments/34165023","id":34165023,"diff_hunk":"@@ -266,6 +266,29 @@ public class MultipartFormData {\n     }\n \n     /**\n+    Creates a body part from the data and appends it to the multipart form data object.\n+    This is to upload non-file data, e.g. a JSON string from the form input\n+    \n+    The body part data will be encoded using the following format:\n+    \n+    - `Content-Disposition: form-data; name=#{name};mimeType=#{mimeType}` (HTTP Header)\n+    - Encoded data\n+    - Multipart form boundary\n+    \n+    :param: data The data to encode into the multipart form data.\n+    :param: name The name to associate with the data in the `Content-Disposition` HTTP header.\n+    :param: mimeType The MIME type to associate with the data in the `Content-Type` HTTP header.\n+    */\n+    public func appendBodyPart(#data: NSData, name: String, mimeType: String) {","path":"Source/MultipartFormData.swift","position":17,"original_position":17,"commit_id":"7fcce8064d7935be67de2f131873df8e33f8cffb","original_commit_id":"7fcce8064d7935be67de2f131873df8e33f8cffb","user":{"login":"kylef","id":44164,"avatar_url":"https://avatars.githubusercontent.com/u/44164?v=3","gravatar_id":"","url":"https://api.github.com/users/kylef","html_url":"https://github.com/kylef","followers_url":"https://api.github.com/users/kylef/followers","following_url":"https://api.github.com/users/kylef/following{/other_user}","gists_url":"https://api.github.com/users/kylef/gists{/gist_id}","starred_url":"https://api.github.com/users/kylef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kylef/subscriptions","organizations_url":"https://api.github.com/users/kylef/orgs","repos_url":"https://api.github.com/users/kylef/repos","events_url":"https://api.github.com/users/kylef/events{/privacy}","received_events_url":"https://api.github.com/users/kylef/received_events","type":"User","site_admin":false},"body":"Perhaps it would make sense to slighly refactor `appendBodyPart(fileData data: NSData, name: String, fileName: String, mimeType: String) ` to make the fileName optional. When omitted it has this behaviour.\r\n\r\n/c @cnoon ","created_at":"2015-07-08T15:58:50Z","updated_at":"2015-07-08T15:58:50Z","html_url":"https://github.com/Alamofire/Alamofire/pull/569#discussion_r34165023","pull_request_url":"https://api.github.com/repos/Alamofire/Alamofire/pulls/569","_links":{"self":{"href":"https://api.github.com/repos/Alamofire/Alamofire/pulls/comments/34165023"},"html":{"href":"https://github.com/Alamofire/Alamofire/pull/569#discussion_r34165023"},"pull_request":{"href":"https://api.github.com/repos/Alamofire/Alamofire/pulls/569"}}},"pull_request":{"url":"https://api.github.com/repos/Alamofire/Alamofire/pulls/569","id":39446358,"html_url":"https://github.com/Alamofire/Alamofire/pull/569","diff_url":"https://github.com/Alamofire/Alamofire/pull/569.diff","patch_url":"https://github.com/Alamofire/Alamofire/pull/569.patch","issue_url":"https://api.github.com/repos/Alamofire/Alamofire/issues/569","number":569,"state":"open","locked":false,"title":"Multipart upload: support to upload non-file data like JSON string from the form input","user":{"login":"top2tech","id":7553721,"avatar_url":"https://avatars.githubusercontent.com/u/7553721?v=3","gravatar_id":"","url":"https://api.github.com/users/top2tech","html_url":"https://github.com/top2tech","followers_url":"https://api.github.com/users/top2tech/followers","following_url":"https://api.github.com/users/top2tech/following{/other_user}","gists_url":"https://api.github.com/users/top2tech/gists{/gist_id}","starred_url":"https://api.github.com/users/top2tech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/top2tech/subscriptions","organizations_url":"https://api.github.com/users/top2tech/orgs","repos_url":"https://api.github.com/users/top2tech/repos","events_url":"https://api.github.com/users/top2tech/events{/privacy}","received_events_url":"https://api.github.com/users/top2tech/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-08T06:47:55Z","updated_at":"2015-07-08T15:58:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3e7b72fa689a5824a0ba0146031c965eacd66b44","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Alamofire/Alamofire/pulls/569/commits","review_comments_url":"https://api.github.com/repos/Alamofire/Alamofire/pulls/569/comments","review_comment_url":"https://api.github.com/repos/Alamofire/Alamofire/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Alamofire/Alamofire/issues/569/comments","statuses_url":"https://api.github.com/repos/Alamofire/Alamofire/statuses/7fcce8064d7935be67de2f131873df8e33f8cffb","head":{"label":"top2tech:master","ref":"master","sha":"7fcce8064d7935be67de2f131873df8e33f8cffb","user":{"login":"top2tech","id":7553721,"avatar_url":"https://avatars.githubusercontent.com/u/7553721?v=3","gravatar_id":"","url":"https://api.github.com/users/top2tech","html_url":"https://github.com/top2tech","followers_url":"https://api.github.com/users/top2tech/followers","following_url":"https://api.github.com/users/top2tech/following{/other_user}","gists_url":"https://api.github.com/users/top2tech/gists{/gist_id}","starred_url":"https://api.github.com/users/top2tech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/top2tech/subscriptions","organizations_url":"https://api.github.com/users/top2tech/orgs","repos_url":"https://api.github.com/users/top2tech/repos","events_url":"https://api.github.com/users/top2tech/events{/privacy}","received_events_url":"https://api.github.com/users/top2tech/received_events","type":"User","site_admin":false},"repo":{"id":38735027,"name":"Alamofire","full_name":"top2tech/Alamofire","owner":{"login":"top2tech","id":7553721,"avatar_url":"https://avatars.githubusercontent.com/u/7553721?v=3","gravatar_id":"","url":"https://api.github.com/users/top2tech","html_url":"https://github.com/top2tech","followers_url":"https://api.github.com/users/top2tech/followers","following_url":"https://api.github.com/users/top2tech/following{/other_user}","gists_url":"https://api.github.com/users/top2tech/gists{/gist_id}","starred_url":"https://api.github.com/users/top2tech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/top2tech/subscriptions","organizations_url":"https://api.github.com/users/top2tech/orgs","repos_url":"https://api.github.com/users/top2tech/repos","events_url":"https://api.github.com/users/top2tech/events{/privacy}","received_events_url":"https://api.github.com/users/top2tech/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/top2tech/Alamofire","description":"Elegant HTTP Networking in Swift","fork":true,"url":"https://api.github.com/repos/top2tech/Alamofire","forks_url":"https://api.github.com/repos/top2tech/Alamofire/forks","keys_url":"https://api.github.com/repos/top2tech/Alamofire/keys{/key_id}","collaborators_url":"https://api.github.com/repos/top2tech/Alamofire/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/top2tech/Alamofire/teams","hooks_url":"https://api.github.com/repos/top2tech/Alamofire/hooks","issue_events_url":"https://api.github.com/repos/top2tech/Alamofire/issues/events{/number}","events_url":"https://api.github.com/repos/top2tech/Alamofire/events","assignees_url":"https://api.github.com/repos/top2tech/Alamofire/assignees{/user}","branches_url":"https://api.github.com/repos/top2tech/Alamofire/branches{/branch}","tags_url":"https://api.github.com/repos/top2tech/Alamofire/tags","blobs_url":"https://api.github.com/repos/top2tech/Alamofire/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/top2tech/Alamofire/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/top2tech/Alamofire/git/refs{/sha}","trees_url":"https://api.github.com/repos/top2tech/Alamofire/git/trees{/sha}","statuses_url":"https://api.github.com/repos/top2tech/Alamofire/statuses/{sha}","languages_url":"https://api.github.com/repos/top2tech/Alamofire/languages","stargazers_url":"https://api.github.com/repos/top2tech/Alamofire/stargazers","contributors_url":"https://api.github.com/repos/top2tech/Alamofire/contributors","subscribers_url":"https://api.github.com/repos/top2tech/Alamofire/subscribers","subscription_url":"https://api.github.com/repos/top2tech/Alamofire/subscription","commits_url":"https://api.github.com/repos/top2tech/Alamofire/commits{/sha}","git_commits_url":"https://api.github.com/repos/top2tech/Alamofire/git/commits{/sha}","comments_url":"https://api.github.com/repos/top2tech/Alamofire/comments{/number}","issue_comment_url":"https://api.github.com/repos/top2tech/Alamofire/issues/comments{/number}","contents_url":"https://api.github.com/repos/top2tech/Alamofire/contents/{+path}","compare_url":"https://api.github.com/repos/top2tech/Alamofire/compare/{base}...{head}","merges_url":"https://api.github.com/repos/top2tech/Alamofire/merges","archive_url":"https://api.github.com/repos/top2tech/Alamofire/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/top2tech/Alamofire/downloads","issues_url":"https://api.github.com/repos/top2tech/Alamofire/issues{/number}","pulls_url":"https://api.github.com/repos/top2tech/Alamofire/pulls{/number}","milestones_url":"https://api.github.com/repos/top2tech/Alamofire/milestones{/number}","notifications_url":"https://api.github.com/repos/top2tech/Alamofire/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/top2tech/Alamofire/labels{/name}","releases_url":"https://api.github.com/repos/top2tech/Alamofire/releases{/id}","created_at":"2015-07-08T05:59:29Z","updated_at":"2015-07-08T05:59:30Z","pushed_at":"2015-07-08T06:28:29Z","git_url":"git://github.com/top2tech/Alamofire.git","ssh_url":"git@github.com:top2tech/Alamofire.git","clone_url":"https://github.com/top2tech/Alamofire.git","svn_url":"https://github.com/top2tech/Alamofire","homepage":"","size":12863,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Alamofire:master","ref":"master","sha":"12a10a2a0a8c4c304bd01738d84180c996e4f056","user":{"login":"Alamofire","id":7774181,"avatar_url":"https://avatars.githubusercontent.com/u/7774181?v=3","gravatar_id":"","url":"https://api.github.com/users/Alamofire","html_url":"https://github.com/Alamofire","followers_url":"https://api.github.com/users/Alamofire/followers","following_url":"https://api.github.com/users/Alamofire/following{/other_user}","gists_url":"https://api.github.com/users/Alamofire/gists{/gist_id}","starred_url":"https://api.github.com/users/Alamofire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alamofire/subscriptions","organizations_url":"https://api.github.com/users/Alamofire/orgs","repos_url":"https://api.github.com/users/Alamofire/repos","events_url":"https://api.github.com/users/Alamofire/events{/privacy}","received_events_url":"https://api.github.com/users/Alamofire/received_events","type":"Organization","site_admin":false},"repo":{"id":22458259,"name":"Alamofire","full_name":"Alamofire/Alamofire","owner":{"login":"Alamofire","id":7774181,"avatar_url":"https://avatars.githubusercontent.com/u/7774181?v=3","gravatar_id":"","url":"https://api.github.com/users/Alamofire","html_url":"https://github.com/Alamofire","followers_url":"https://api.github.com/users/Alamofire/followers","following_url":"https://api.github.com/users/Alamofire/following{/other_user}","gists_url":"https://api.github.com/users/Alamofire/gists{/gist_id}","starred_url":"https://api.github.com/users/Alamofire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alamofire/subscriptions","organizations_url":"https://api.github.com/users/Alamofire/orgs","repos_url":"https://api.github.com/users/Alamofire/repos","events_url":"https://api.github.com/users/Alamofire/events{/privacy}","received_events_url":"https://api.github.com/users/Alamofire/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Alamofire/Alamofire","description":"Elegant HTTP Networking in Swift","fork":false,"url":"https://api.github.com/repos/Alamofire/Alamofire","forks_url":"https://api.github.com/repos/Alamofire/Alamofire/forks","keys_url":"https://api.github.com/repos/Alamofire/Alamofire/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Alamofire/Alamofire/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Alamofire/Alamofire/teams","hooks_url":"https://api.github.com/repos/Alamofire/Alamofire/hooks","issue_events_url":"https://api.github.com/repos/Alamofire/Alamofire/issues/events{/number}","events_url":"https://api.github.com/repos/Alamofire/Alamofire/events","assignees_url":"https://api.github.com/repos/Alamofire/Alamofire/assignees{/user}","branches_url":"https://api.github.com/repos/Alamofire/Alamofire/branches{/branch}","tags_url":"https://api.github.com/repos/Alamofire/Alamofire/tags","blobs_url":"https://api.github.com/repos/Alamofire/Alamofire/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Alamofire/Alamofire/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Alamofire/Alamofire/git/refs{/sha}","trees_url":"https://api.github.com/repos/Alamofire/Alamofire/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Alamofire/Alamofire/statuses/{sha}","languages_url":"https://api.github.com/repos/Alamofire/Alamofire/languages","stargazers_url":"https://api.github.com/repos/Alamofire/Alamofire/stargazers","contributors_url":"https://api.github.com/repos/Alamofire/Alamofire/contributors","subscribers_url":"https://api.github.com/repos/Alamofire/Alamofire/subscribers","subscription_url":"https://api.github.com/repos/Alamofire/Alamofire/subscription","commits_url":"https://api.github.com/repos/Alamofire/Alamofire/commits{/sha}","git_commits_url":"https://api.github.com/repos/Alamofire/Alamofire/git/commits{/sha}","comments_url":"https://api.github.com/repos/Alamofire/Alamofire/comments{/number}","issue_comment_url":"https://api.github.com/repos/Alamofire/Alamofire/issues/comments{/number}","contents_url":"https://api.github.com/repos/Alamofire/Alamofire/contents/{+path}","compare_url":"https://api.github.com/repos/Alamofire/Alamofire/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Alamofire/Alamofire/merges","archive_url":"https://api.github.com/repos/Alamofire/Alamofire/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Alamofire/Alamofire/downloads","issues_url":"https://api.github.com/repos/Alamofire/Alamofire/issues{/number}","pulls_url":"https://api.github.com/repos/Alamofire/Alamofire/pulls{/number}","milestones_url":"https://api.github.com/repos/Alamofire/Alamofire/milestones{/number}","notifications_url":"https://api.github.com/repos/Alamofire/Alamofire/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Alamofire/Alamofire/labels{/name}","releases_url":"https://api.github.com/repos/Alamofire/Alamofire/releases{/id}","created_at":"2014-07-31T05:56:19Z","updated_at":"2015-07-08T14:40:56Z","pushed_at":"2015-07-08T06:47:56Z","git_url":"git://github.com/Alamofire/Alamofire.git","ssh_url":"git@github.com:Alamofire/Alamofire.git","clone_url":"https://github.com/Alamofire/Alamofire.git","svn_url":"https://github.com/Alamofire/Alamofire","homepage":"","size":12863,"stargazers_count":9384,"watchers_count":9384,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1180,"mirror_url":null,"open_issues_count":12,"forks":1180,"open_issues":12,"watchers":9384,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Alamofire/Alamofire/pulls/569"},"html":{"href":"https://github.com/Alamofire/Alamofire/pull/569"},"issue":{"href":"https://api.github.com/repos/Alamofire/Alamofire/issues/569"},"comments":{"href":"https://api.github.com/repos/Alamofire/Alamofire/issues/569/comments"},"review_comments":{"href":"https://api.github.com/repos/Alamofire/Alamofire/pulls/569/comments"},"review_comment":{"href":"https://api.github.com/repos/Alamofire/Alamofire/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Alamofire/Alamofire/pulls/569/commits"},"statuses":{"href":"https://api.github.com/repos/Alamofire/Alamofire/statuses/7fcce8064d7935be67de2f131873df8e33f8cffb"}}}}