I'm looking to send some files over HTTP from one server to another, and am wondering what the best MIME type and method to do so is. Currently I have a RESTful HTTP server and have an endpoint which may return one or more files, and am returning the contents as json with the text in the json body. This works well for text files, but for a binary format, I would have to base64 encode the contents which isn't an option.
I have looked into multipart/form-data, multipart/mixed, and application/zip, but don't have enough experience to weigh the pros and cons myself. I want this data to be send back in the HTTP response to a get request, which is why I'm slightly hesitant to use multipart/form-data as I've seen it used a lot for post requests to servers. Any thoughts?