Showing
1 changed file
with
16 additions
and
0 deletions
API/api.js
0 → 100644
| 1 | + | ||
| 2 | +var request = require('request'); | ||
| 3 | + | ||
| 4 | +var url = 'http://openapi.molit.go.kr/OpenAPI_ToolInstallPackage/service/rest/RTMSOBJSvc/getRTMSDataSvcLandTrade'; | ||
| 5 | +var queryParams = '?' + encodeURIComponent('ServiceKey') + '=aOirrPIaJrx9RbuDcSM5rE3zzWUmbTaR2nAU4AcdQT2cFkJlG1ZeKa%2FlVF8wHFJthJT6C3jeS5n%2FP%2B3pBggZrw%3D%3D'; /* Service Key*/ | ||
| 6 | +queryParams += '&' + encodeURIComponent('LAWD_CD') + '=' + encodeURIComponent('11110'); /* */ | ||
| 7 | +queryParams += '&' + encodeURIComponent('DEAL_YMD') + '=' + encodeURIComponent('201512'); /* */ | ||
| 8 | + | ||
| 9 | +request({ | ||
| 10 | + url: url + queryParams, | ||
| 11 | + method: 'GET' | ||
| 12 | +}, function (error, response, body) { | ||
| 13 | + console.log('Status', response.statusCode); | ||
| 14 | + console.log('Headers', JSON.stringify(response.headers)); | ||
| 15 | + console.log('Reponse received', body); | ||
| 16 | +}); |
-
Please register or login to post a comment