Showing
1 changed file
with
5 additions
and
1 deletions
... | @@ -98,11 +98,15 @@ async function handleEvent(event) { | ... | @@ -98,11 +98,15 @@ async function handleEvent(event) { |
98 | 'detectOrientation': 'true', | 98 | 'detectOrientation': 'true', |
99 | }, | 99 | }, |
100 | headers: { | 100 | headers: { |
101 | - 'Content-Type': 'multipart/form-data', | 101 | + 'Content-Type': 'application/json', |
102 | 'Ocp-Apim-Subscription-Key': '979dc5d63344438fa4701c62feebb7dc' | 102 | 'Ocp-Apim-Subscription-Key': '979dc5d63344438fa4701c62feebb7dc' |
103 | }, | 103 | }, |
104 | body: fs.readFileSync('./photo/1.png') | 104 | body: fs.readFileSync('./photo/1.png') |
105 | }; | 105 | }; |
106 | + request.get('/photo',(req,res)=>{ | ||
107 | + res.send(body); | ||
108 | + }) | ||
109 | + | ||
106 | request.post(options, function (error, response, body) { | 110 | request.post(options, function (error, response, body) { |
107 | var data=body; | 111 | var data=body; |
108 | console.log(data); | 112 | console.log(data); | ... | ... |
-
Please register or login to post a comment