Hi, thanks for reaching out. It seems you want to read using local image instead of image url. Yes, this can be done by specifying content-type as 'application/octet-stream' in the request header. For example:
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://westus.api.cognitive.microsoft.com/vision/v3.2/read/analyze',
'headers': {
'Ocp-Apim-Subscription-Key': 'enter-key-here',
'Content-Type': 'application/octet-stream'
},
body: "<file contents here>"
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
You may also find this thread helpful.
----------
--please don't forget to Accept Answer
if the reply is helpful. Thanks.--