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 12:51:55 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
77c7eff23e237e1152a413670028914505fbacd2
77c7eff2
1 parent
79af976e
Update app.js
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
app.js
app.js
View file @
77c7eff
...
...
@@ -88,10 +88,7 @@ async function handleEvent(event) {
console
.
log
(
chunk
);
var
cheerio
=
require
(
'cheerio'
);
let
subscriptionKey
=
process
.
env
[
'COMPUTER_VISION_SUBSCRIPTION_KEY'
];
let
endpoint
=
process
.
env
[
'COMPUTER_VISION_ENDPOINT'
];
console
.
log
(
subscriptionKey
);
var
uriBase
=
endpoint
+
'vision/v2.1/ocr'
;
var
uriBase
=
'https://koreacentral.api.cognitive.microsoft.com/vision/v2.1/ocr'
;
var
options
=
{
uri
:
uriBase
,
qs
:
{
...
...
@@ -101,7 +98,7 @@ async function handleEvent(event) {
},
headers
:
{
'Content-Type'
:
'application/octet-stream'
,
'Ocp-Apim-Subscription-Key'
:
subscriptionKey
'Ocp-Apim-Subscription-Key'
:
'979dc5d63344438fa4701c62feebb7dc'
},
body
:
chunk
};
...
...
Please
register
or
login
to post a comment