Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const searchOpts = {
featureNS,
featurePrefix,
featureTypes,
geometryName,
maxFeatures,
outputFormat,
propertyNames,
srsName,
wfsFormatOptions,
searchAttributes,
attributeDetails
};
const request = WfsFilterUtil.getCombinedRequests(
searchOpts, this.state.searchTerm
);
if (request) {
this.setState({
fetching: true
}, () => {
fetch(`${baseUrl}`, {
method: 'POST',
credentials: additionalFetchOptions.credentials
? additionalFetchOptions.credentials
: 'same-origin',
body: new XMLSerializer().serializeToString(request),
...additionalFetchOptions
})
.then(response => response.json())
const searchOpts = {
featureNS,
featurePrefix,
featureTypes,
geometryName,
maxFeatures,
outputFormat,
propertyNames,
srsName,
wfsFormatOptions,
searchAttributes,
attributeDetails
};
const request = WfsFilterUtil.getCombinedRequests(
searchOpts, this.state.searchTerm
);
if (request) {
this.setState({
fetching: true
}, () => {
fetch(`${baseUrl}`, {
method: 'POST',
credentials: additionalFetchOptions.credentials
? additionalFetchOptions.credentials
: 'same-origin',
body: new XMLSerializer().serializeToString(request),
...additionalFetchOptions
})
.then(response => response.json())