{"action":"created","issue":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/2112","repository_url":"https://api.github.com/repos/PowerShell/PowerShell","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/2112/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/2112/comments","events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/2112/events","html_url":"https://github.com/PowerShell/PowerShell/issues/2112","id":173670993,"number":2112,"title":"Simplify usage of Multipart Uploads with WebRequestPSCmdlet","user":{"login":"ffeldhaus","id":910802,"avatar_url":"https://avatars1.githubusercontent.com/u/910802?v=4","gravatar_id":"","url":"https://api.github.com/users/ffeldhaus","html_url":"https://github.com/ffeldhaus","followers_url":"https://api.github.com/users/ffeldhaus/followers","following_url":"https://api.github.com/users/ffeldhaus/following{/other_user}","gists_url":"https://api.github.com/users/ffeldhaus/gists{/gist_id}","starred_url":"https://api.github.com/users/ffeldhaus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ffeldhaus/subscriptions","organizations_url":"https://api.github.com/users/ffeldhaus/orgs","repos_url":"https://api.github.com/users/ffeldhaus/repos","events_url":"https://api.github.com/users/ffeldhaus/events{/privacy}","received_events_url":"https://api.github.com/users/ffeldhaus/received_events","type":"User","site_admin":false},"labels":[{"id":401720606,"url":"https://api.github.com/repos/PowerShell/PowerShell/labels/Area-Cmdlets","name":"Area-Cmdlets","color":"5319e7","default":false},{"id":311043050,"url":"https://api.github.com/repos/PowerShell/PowerShell/labels/Issue-Enhancement","name":"Issue-Enhancement","color":"fc2929","default":false},{"id":401721267,"url":"https://api.github.com/repos/PowerShell/PowerShell/labels/Up-for-Grabs","name":"Up-for-Grabs","color":"000000","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-08-28T22:11:08Z","updated_at":"2017-08-25T11:13:22Z","closed_at":null,"body":"Doing multipart requests with PowerShell is quite complicated and requires several extra steps for large file uploads. [An easy example for a small file can be found on StackOverflow](http://stackoverflow.com/questions/36268925/powershell-invoke-restmethod-multipart-form-data). [An in depth discussion can be found in this blog post](http://blog.majcica.com/2016/01/13/powershell-tips-and-tricks-multipartform-data-requests/). \n\nIt would be a huge improvement if the WebRequestPSCmdlets (Invoke-RestMethod and Invoke-WebRequest) could be enhanced so that they support Multipart messages directly.\n\nFor an implementation I would expect the following parameters:\n- MultipartFile (Path)\n- MultipartName (Name to be used in Multipart message)\n\n[.NET Core seems to have support for MultipartContent](https://github.com/dotnet/corefx/blob/d0dc5fc099946adc1035b34a8b1f6042eddb0c75/src/System.Net.Http/src/System/Net/Http/MultipartContent.cs) which may simplify the implementation.\n"},"comment":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/comments/324890279","html_url":"https://github.com/PowerShell/PowerShell/issues/2112#issuecomment-324890279","issue_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/2112","id":324890279,"user":{"login":"iSazonov","id":22290914,"avatar_url":"https://avatars2.githubusercontent.com/u/22290914?v=4","gravatar_id":"","url":"https://api.github.com/users/iSazonov","html_url":"https://github.com/iSazonov","followers_url":"https://api.github.com/users/iSazonov/followers","following_url":"https://api.github.com/users/iSazonov/following{/other_user}","gists_url":"https://api.github.com/users/iSazonov/gists{/gist_id}","starred_url":"https://api.github.com/users/iSazonov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iSazonov/subscriptions","organizations_url":"https://api.github.com/users/iSazonov/orgs","repos_url":"https://api.github.com/users/iSazonov/repos","events_url":"https://api.github.com/users/iSazonov/events{/privacy}","received_events_url":"https://api.github.com/users/iSazonov/received_events","type":"User","site_admin":false},"created_at":"2017-08-25T11:13:22Z","updated_at":"2017-08-25T11:13:22Z","body":"Feel free to ping MSFT experts here if there is compatibility issues."}}
{"actor":{"display_login":"iSazonov"}}