Anyway to do an httpPost with multipart/form-data

I'm thinking the answer is no, but is there anyway to do a multipart/form-data httpPost()? Nothing in the documentation about it that I can see. Figured I'd ask before giving up!

is this not possible ?

I believe the general answer is no, it is not. I found a semi-workable solution for ASCII files where I do it by hand hubitat-packagemanager/Package_Manager.groovy at 5780b46d6e4a66136e382be377a448fc57f30500 · dcmeglio/hubitat-packagemanager · GitHub but it's clearly a hack.

I didn't understand the solution in that example, but after my post above I found that using "new hubitat.device.HubAction" and creating the body with required multipart boundaries, it works.

Yeah. That’s pretty much what I meant. But I don’t believe it will work for binary data

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.