Search code examples
httppostencodingmidi

Sending MIDI data over HTTP


How can I efficiently transfer MIDI data to remote client over HTTP (POST)? There are no real time issues here, I just don't know how to encode the data.

Should I use plain string-pairs? I think a better way will be to just send the binary data over the HTTP, I just don't know how to do it.

Thank You


Solution

  • Two options:

    1. Encode the MIDI in base 64 and send it as the body of the POST (not sure what language you're using but most languages should have base 64 support readily available)
    2. Go the multipart/form-data route and actually send the file