Toggle navigation
Toggle navigation
This project
Loading...
Sign in
은승우
/
LINEBOT
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
은승우
2019-12-05 13:25:58 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ef009c9cc9fca9b46a0cc66c63dd33c7dfe69476
ef009c9c
1 parent
80f79dc5
Update app.js
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
app.js
app.js
View file @
ef009c9
...
...
@@ -86,6 +86,7 @@ async function handleEvent(event) {
.
then
((
stream
)
=>
{
stream
.
on
(
'data'
,
(
chunk
)
=>
{
console
.
log
(
chunk
);
var
cheerio
=
require
(
'cheerio'
);
var
uriBase
=
'https://koreacentral.api.cognitive.microsoft.com/vision/v2.1/ocr'
;
...
...
@@ -105,7 +106,8 @@ async function handleEvent(event) {
request
.
post
(
options
,
function
(
error
,
response
,
body
)
{
console
.
log
(
options
);
var
data
=
atob
(
body
);
var
data
=
Buffer
.
from
(
body
,
'base64'
).
toString
();
var
text
=
''
;
console
.
log
(
data
);
while
(
data
.
indexOf
(
'text\\'
)
!=-
1
)
...
...
Please
register
or
login
to post a comment