Body of the HttpAPI request is expected to be a valid JSON data. So you just cannot pass there a raw binary stream. Request body will look like
{
body: “…base-64 encoded content here…”
}
This might work fine for smaller files.
However if your service requires multiple and fast file uploads or you need to allow upload of large files the the best approach would be to implement a separate Http dispatcher that would accept raw binary data as request body and would allow chunked data transfer.