Converting a pdf to binary

I need to send to a multi-part API with one of the fields requiring this:

"The ‘file’ field contains the desired file name, file contents as a binary plain text string and the content-type. These two fields and their values must be encoded as a single data payload of multipart/form-data."

I'm not sure how to do this. I've explored Lambda but am not familiar enough to get that working.

2 replies