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

Commit

Permalink
watson now sends “text/plain”
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederic Lavigne committed Apr 19, 2017
1 parent 0750014 commit 8832716
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions processing/speechtotext/speechtotext.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ function onChallengeRequest(challenge, secret, signature) {
console.log('[OK] Challenge accepted!');
return {
headers: {
// force Content-Type as JSON as Watson sends an Accept: application/json
'Content-Type': 'application/json'
'Content-Type': 'text/plain'
},
// but sends the body as raw data as Watson expects plain text
body: new Buffer(challenge).toString('base64')
Expand Down

0 comments on commit 8832716

Please sign in to comment.