Forum

Sending binary with HTTP (Network Post)

hi all,
(there’s a tl/dr at the end)
i’m trying to use the online ASE converter through HTTP-(Network-Post). the problem i am facing is sending the .ase file over:

  • there is no MIME type for “application/octet-stream”, which is what the webpage uses (not the source of the problems, but…)
  • the showstopper: when sending the file, the binary in Value gets cut abruptly.

there’s a patch for sending PNGs in https://discourse.vvvv.org/t/5378 thread], and here the issue is much the same (with the correct encoding): with eg. a png of 4kB, and with this data shown correctly in the Value using the Inspektor, the actual content that gets sent is truncated (content-length of the binary field in the outgoing request is only 12). i tried passing the data through URLEncode (String): unsurprisingly, it did not work completely (i get an 500 Internal Server Error in response), but the data does get sent in its entirety (i’m using a monitoring tool).

has anyone worked around this? basically, i guess the question boils down to
how to send binary data with HTTP-(Network-Post)?

edit: for anyone willing to do a node for this, http://www.paraesthesia.com/archive/2009/12/16/posting-multipartform-data-using-.net-webrequest.aspx

see: