{"action":"created","issue":{"url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/issues/33","labels_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/issues/33/comments","events_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/issues/33/events","html_url":"https://github.com/strongloop/loopback-sdk-ios/pull/33","id":61054045,"number":33,"title":"Fix implementation issues found in LBFile and SLRESTAdapter","user":{"login":"hideya","id":321713,"avatar_url":"https://avatars.githubusercontent.com/u/321713?v=3","gravatar_id":"","url":"https://api.github.com/users/hideya","html_url":"https://github.com/hideya","followers_url":"https://api.github.com/users/hideya/followers","following_url":"https://api.github.com/users/hideya/following{/other_user}","gists_url":"https://api.github.com/users/hideya/gists{/gist_id}","starred_url":"https://api.github.com/users/hideya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hideya/subscriptions","organizations_url":"https://api.github.com/users/hideya/orgs","repos_url":"https://api.github.com/users/hideya/repos","events_url":"https://api.github.com/users/hideya/events{/privacy}","received_events_url":"https://api.github.com/users/hideya/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/labels/%23community%20contribution","name":"#community contribution","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-13T12:31:31Z","updated_at":"2015-03-13T14:17:55Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/pulls/33","html_url":"https://github.com/strongloop/loopback-sdk-ios/pull/33","diff_url":"https://github.com/strongloop/loopback-sdk-ios/pull/33.diff","patch_url":"https://github.com/strongloop/loopback-sdk-ios/pull/33.patch"},"body":"LBFile and SLRESTAdapter seemed left in a temporary implementation to get the file upload/download working. (e.g. the contract for file download needed to be \"/%@/:container/download\" with multipart specified, which should have been \"/%@/:container/download/:name\" w/o multipart).\r\n\r\nIn order to support file downloading in an efficient manner, adapter's invoke methods now include the versions that takes an output stream as a parameter.  If a stream is set, the entire response data go into the stream.  It is used for fixing file download implementation in LBFile.  It is also intended to be used for binary payload download to a data buffer in future.\r\n\r\nMultipart form handling was made better (it used to be specialized just for the purpose of file uploading).  If multipart is set to YES in the contract, SLRESTAdapter's invoke methods construct each part based on a StreamParam object supplied via the parameters.\r\n\r\nMade SLRESTContractItem's instance initialization methods private, as those won't be called directly by developers.\r\n\r\nLBFile's API has not been changed (but some changes are under consideration).\r\n\r\n@bajtos could you please review?"},"comment":{"url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/issues/comments/78990698","html_url":"https://github.com/strongloop/loopback-sdk-ios/pull/33#issuecomment-78990698","issue_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/issues/33","id":78990698,"user":{"login":"bajtos","id":1140553,"avatar_url":"https://avatars.githubusercontent.com/u/1140553?v=3","gravatar_id":"","url":"https://api.github.com/users/bajtos","html_url":"https://github.com/bajtos","followers_url":"https://api.github.com/users/bajtos/followers","following_url":"https://api.github.com/users/bajtos/following{/other_user}","gists_url":"https://api.github.com/users/bajtos/gists{/gist_id}","starred_url":"https://api.github.com/users/bajtos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bajtos/subscriptions","organizations_url":"https://api.github.com/users/bajtos/orgs","repos_url":"https://api.github.com/users/bajtos/repos","events_url":"https://api.github.com/users/bajtos/events{/privacy}","received_events_url":"https://api.github.com/users/bajtos/received_events","type":"User","site_admin":false},"created_at":"2015-03-13T14:17:55Z","updated_at":"2015-03-13T14:17:55Z","body":"@hideya great stuff, thank you for the pull request.\r\n\r\nAFAICT, there are no tests for file upload via a multipart request in the file SLRemotingTests/SLRESTAdapterTests.m, could you please add some?\r\n\r\nMy comments above will be probably gone after your rebase & force-push, here is a link to the commit so that we can find them later: 6196a77e96428"}}