Showing
1 changed file
with
3 additions
and
3 deletions
... | @@ -97,15 +97,15 @@ async function handleEvent(event) { | ... | @@ -97,15 +97,15 @@ async function handleEvent(event) { |
97 | language: 'en' | 97 | language: 'en' |
98 | }, | 98 | }, |
99 | headers: { | 99 | headers: { |
100 | - 'Content-Type': 'application/json', | 100 | + 'Content-Type': 'application/octet-stream', |
101 | 'Ocp-Apim-Subscription-Key': '979dc5d63344438fa4701c62feebb7dc' | 101 | 'Ocp-Apim-Subscription-Key': '979dc5d63344438fa4701c62feebb7dc' |
102 | }, | 102 | }, |
103 | - body: atob(chunk) | 103 | + body: chunk |
104 | }; | 104 | }; |
105 | 105 | ||
106 | request.post(options, function (error, response, body) { | 106 | request.post(options, function (error, response, body) { |
107 | console.log(options); | 107 | console.log(options); |
108 | - var data=JSON.stringify(body); | 108 | + var data=atob(body); |
109 | var text=''; | 109 | var text=''; |
110 | console.log(data); | 110 | console.log(data); |
111 | while(data.indexOf('text\\')!=-1) | 111 | while(data.indexOf('text\\')!=-1) | ... | ... |
-
Please register or login to post a comment