airborne
airborne copied to clipboard
How would you send a file over post?
Given the following JSON body I must match:
msg: {
body: "test",
attachments: [att1, att2...]
}
And headers: {'Content-Type' => 'multipart/form-data'}
How do I have to write my code to send attachments?
Tried f1 = File.open(dir) and putting f1 into attachments: doesn't work.
@pedroadame posted an answer over here:
https://github.com/brooklynDev/airborne/issues/84