Skip to content
This repository has been archived by the owner on Jan 12, 2021. It is now read-only.

Commit

Permalink
send raw text
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederic Lavigne committed Apr 19, 2017
1 parent 8832716 commit cadb723
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions processing/speechtotext/speechtotext.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,16 @@ function onChallengeRequest(challenge, secret, signature) {
headers: {
'Content-Type': 'text/plain'
},
// but sends the body as raw data as Watson expects plain text
body: new Buffer(challenge).toString('base64')
body: challenge
};
}

console.log('[KO] Signature does not match');
return {
code: 500,
headers: {
'Content-Type': 'text/plain'
},
body: 'Bad signature'
};
}
Expand Down

0 comments on commit cadb723

Please sign in to comment.