{"action":"closed","issue":{"url":"https://api.github.com/repos/scalaj/scalaj-http/issues/170","repository_url":"https://api.github.com/repos/scalaj/scalaj-http","labels_url":"https://api.github.com/repos/scalaj/scalaj-http/issues/170/labels{/name}","comments_url":"https://api.github.com/repos/scalaj/scalaj-http/issues/170/comments","events_url":"https://api.github.com/repos/scalaj/scalaj-http/issues/170/events","html_url":"https://github.com/scalaj/scalaj-http/issues/170","id":341122847,"node_id":"MDU6SXNzdWUzNDExMjI4NDc=","number":170,"title":"Not able to pass in file as parameter for mutli-part form requests","user":{"login":"Farhan-Islam","id":6244969,"node_id":"MDQ6VXNlcjYyNDQ5Njk=","avatar_url":"https://avatars0.githubusercontent.com/u/6244969?v=4","gravatar_id":"","url":"https://api.github.com/users/Farhan-Islam","html_url":"https://github.com/Farhan-Islam","followers_url":"https://api.github.com/users/Farhan-Islam/followers","following_url":"https://api.github.com/users/Farhan-Islam/following{/other_user}","gists_url":"https://api.github.com/users/Farhan-Islam/gists{/gist_id}","starred_url":"https://api.github.com/users/Farhan-Islam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Farhan-Islam/subscriptions","organizations_url":"https://api.github.com/users/Farhan-Islam/orgs","repos_url":"https://api.github.com/users/Farhan-Islam/repos","events_url":"https://api.github.com/users/Farhan-Islam/events{/privacy}","received_events_url":"https://api.github.com/users/Farhan-Islam/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-07-13T18:48:35Z","updated_at":"2018-07-16T19:10:41Z","closed_at":"2018-07-16T19:10:41Z","author_association":"NONE","body":"I'm trying to use scalaj-http to send an POST request for twitter upload. Ive attached the documentation of what they require for the request. The part I'm having trouble with is trying to pass in the actual binary file as a parameter for \"media\". I can only seem to see how to do postMulti which is just the file and then add parameter but not actually pass in the data as a parameter.\r\n\r\n```\r\nval appendResponse = Http(twitterApiUrl)\r\n      .postMulti(MultiPart(\"Output\", \"Output.bin\", \"application/octet-stream\", byteArray))\r\n      .params(Seq(\"command\" -> \"APPEND\", \"media_id\" -> twitterMediaID, \"segment_index\" -> \"0\", \"media\" -> byteArray))\r\n      .oauth(consumer, access)\r\n      .asString\r\n```\r\n\r\nhttps://developer.twitter.com/en/docs/media/upload-media/api-reference/post-media-upload-append"}}
{"actor":{"display_login":"Farhan-Islam"}}