api.js 788 Bytes

var request = require('request');

var url = 'http://openapi.molit.go.kr/OpenAPI_ToolInstallPackage/service/rest/RTMSOBJSvc/getRTMSDataSvcLandTrade';
var queryParams = '?' + encodeURIComponent('ServiceKey') + '=aOirrPIaJrx9RbuDcSM5rE3zzWUmbTaR2nAU4AcdQT2cFkJlG1ZeKa%2FlVF8wHFJthJT6C3jeS5n%2FP%2B3pBggZrw%3D%3D'; /* Service Key*/
queryParams += '&' + encodeURIComponent('LAWD_CD') + '=' + encodeURIComponent('11110'); /* */
queryParams += '&' + encodeURIComponent('DEAL_YMD') + '=' + encodeURIComponent('201512'); /* */

request({
    url: url + queryParams,
    method: 'GET'
}, function (error, response, body) {
    console.log('Status', response.statusCode);
    console.log('Headers', JSON.stringify(response.headers));
    console.log('Reponse received', body);
});