```
var request = require('request'); //node module for http post requests

exports.retreiveMessage = function (session){

request.post({
    url: 'https://southcentralus.api.cognitive.microsoft.com/customvision/v1.0/Prediction/279ae65a-c1f8-4eb0-a4d8-03a3234bc023/image?iterationId=bcfb842f-df51-47e3-8ba4-c90209a16003',
    json: true,
    headers: {
        'Content-Type': 'application/octet-stream',
        'Prediction-Key': 'XXXXX'
    },
    body: session.message.attachments[0]
}, function(error, response, body){
    if (error){
        console.log(error);
    }

    console.log(validResponse(body));
    session.send(validResponse(body));
});
}

function validResponse(body){
if (body && body.Predictions && body.Predictions[0].Tag){
    return "This is " + body.Predictions[0].Tag
} else{
    console.log('Oops, please try again! Something is wrong with custom vision.');
}
}

```

This is the block of code that I'm trying to use to post an image attachment to Custom Vision API, but I keep getting BadRequestImageFormat and I don't know what to do. Any help is appreciated.