I've been struggling with a challenging issue in Meteor.js that I'm hoping to resolve. My goal is to make API calls to a face detection open API service by sending an image and receiving a JSON object in return. However, I have hit a roadblock as I can't figure out how to send an image in the post body using Meteor.js. The default http package in Meteor offers the following methods:
HTTP.post(url, [callOptions], [asyncCallback])
or
HTTP.call(method, url, [options], [asyncCallback])
with the options
[options]
data Object
A JSON-able object to stringify and use as the HTTP request body. Overwrites content.
My main question revolves around how to include a binary stream in the post body.
If anyone could provide assistance, it would be greatly appreciated.