Seokjin

[DELETE]image.js

1 -var request = require('request');
2 -
3 -var url = 'http://apis.data.go.kr/1360000/VilageFcstInfoService_2.0/getUltraSrtNcst';
4 -var queryParams = '?' + encodeURIComponent('serviceKey') + '=3OcUyvx97Vx2YikiZ9IHyRQ6suapku7Xn8VlefQKQWrGIFOGaejhbevwagcubdHfSiQAqJwCV5lyIutw0%2BsppA%3D%3D'; /* Service Key*/
5 -queryParams += '&' + encodeURIComponent('pageNo') + '=' + encodeURIComponent('1'); /* */
6 -queryParams += '&' + encodeURIComponent('numOfRows') + '=' + encodeURIComponent('1000'); /* */
7 -queryParams += '&' + encodeURIComponent('dataType') + '=' + encodeURIComponent('JSON'); /* */
8 -queryParams += '&' + encodeURIComponent('base_date') + '=' + encodeURIComponent('20220605'); /* */
9 -queryParams += '&' + encodeURIComponent('base_time') + '=' + encodeURIComponent('0600'); /* */
10 -queryParams += '&' + encodeURIComponent('nx') + '=' + encodeURIComponent('55'); /* */
11 -queryParams += '&' + encodeURIComponent('ny') + '=' + encodeURIComponent('127'); /* */
12 -
13 -request({
14 - url: url + queryParams,
15 - method: 'GET'
16 -}, function (error, response, body) {
17 - //console.log('Status', response.statusCode);
18 - //console.log('Headers', JSON.stringify(response.headers));
19 - console.log('Reponse received', body);
20 -});
...\ No newline at end of file ...\ No newline at end of file