Showing
1 changed file
with
19 additions
and
0 deletions
express/app2.js
0 → 100644
1 | +var express = require('express'); | ||
2 | +const request = require('request'); | ||
3 | +const api_url = 'http://apis.data.go.kr/1471000/FoodAdtvInfoService'; | ||
4 | +//발급받은 키 | ||
5 | +const key = 'PFs%2BxbmfLdZwXaK7l5l9w4xEcdaDcYByiEj9PoHq2KCPAtx%2FE1N7OPUaCPr6bam18nVQgKOnuxMlaRsJhG6gyQ%3D%3D' | ||
6 | + | ||
7 | +const a_url = api_url +'/getFoodAdtvInfoList?ServiceKey='+key+'&numOfRows=3&pageNo=1'; | ||
8 | + | ||
9 | +console.log(a_url); | ||
10 | + | ||
11 | +request.post({ | ||
12 | + url: a_url, | ||
13 | + form:{ | ||
14 | + key:'value', | ||
15 | + } | ||
16 | + | ||
17 | +},(error,respopnse,body) =>{ | ||
18 | + console.log(body) | ||
19 | +}); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
-
Please register or login to post a comment