shin0112

modify emergency_api.js

...@@ -6,11 +6,14 @@ const convert = require("xml-js"); ...@@ -6,11 +6,14 @@ const convert = require("xml-js");
6 var url = 'http://apis.data.go.kr/B552657/ErmctInfoInqireService/getSrsillDissAceptncPosblInfoInqire'; 6 var url = 'http://apis.data.go.kr/B552657/ErmctInfoInqireService/getSrsillDissAceptncPosblInfoInqire';
7 var queryParams = '?' + encodeURIComponent('serviceKey') + '=52tXHgaW46YUpGn9k0r3IQrduIl6kBOl3Ta8Idra1%2BpPMYhL4qVCDu9itW8FVbDtMF4f9LAT9NJXEx7pvEJv%2FQ%3D%3D'; /* Service Key*/ 7 var queryParams = '?' + encodeURIComponent('serviceKey') + '=52tXHgaW46YUpGn9k0r3IQrduIl6kBOl3Ta8Idra1%2BpPMYhL4qVCDu9itW8FVbDtMF4f9LAT9NJXEx7pvEJv%2FQ%3D%3D'; /* Service Key*/
8 8
9 -queryParams += '&' + encodeURIComponent('STAGE1') + '=' + '%EC%84%9C%EC%9A%B8%ED%8A%B9%EB%B3%84%EC%8B%9C'; /* encodeURIComponent('¼­¿ïƯº°½Ã')*/ 9 +queryParams += '&' + encodeURIComponent('STAGE1') + '=' + encodeURIComponent('¼­¿ïƯº°½Ã'); /* */
10 -queryParams += '&' + encodeURIComponent('STAGE2') + '=' + '%EA%B0%95%EB%82%A8%EA%B5%AC'; /* */ 10 +queryParams += '&' + encodeURIComponent('STAGE2') + '=' + encodeURIComponent('°­³²±¸'); /* */
11 +queryParams += '&' + encodeURIComponent('SM_TYPE') + '=' + encodeURIComponent(''); /* */
11 queryParams += '&' + encodeURIComponent('pageNo') + '=' + encodeURIComponent('1'); /* */ 12 queryParams += '&' + encodeURIComponent('pageNo') + '=' + encodeURIComponent('1'); /* */
12 queryParams += '&' + encodeURIComponent('numOfRows') + '=' + encodeURIComponent('10'); /* */ 13 queryParams += '&' + encodeURIComponent('numOfRows') + '=' + encodeURIComponent('10'); /* */
13 14
15 +console.log(queryParams);
16 +
14 request({ 17 request({
15 url: url + queryParams, 18 url: url + queryParams,
16 method: 'GET' 19 method: 'GET'
......