
import https from 'https';

const url = 'https://www.wfs.nrw.de/geobasis/wfs_nw_alkis_vereinfacht?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=ave:Flurstueck&COUNT=1';

https.get(url, (res) => {
    let data = '';
    res.on('data', (chunk) => data += chunk);
    res.on('end', () => {
        console.log("Response Status:", res.statusCode);
        console.log("\nResponse Body Preview (first 2000 chars):");
        console.log(data.substring(0, 2000));

        // Check for user mentioned tags
        console.log("\nTags check:");
        console.log("flstnrzae?", data.includes('flstnrzae'));
        console.log("flstnrnen?", data.includes('flstnrnen'));
        console.log("gemeinde?", data.includes('gemeinde'));
        console.log("gemarkung?", data.includes('gemarkung'));
        console.log("flur?", data.includes('flur'));
    });
}).on('error', (e) => {
    console.error(e);
});
