Relecture code

This commit is contained in:
Fabrice PENHOËT 2021-10-07 18:10:03 +02:00
parent 318353c862
commit 776c9a8f40

View File

@ -70,11 +70,7 @@ export class ParserForJSON implements Parsers
headers.append(header.key, header.value); headers.append(header.key, header.value);
} }
const credentials : RequestCredentials|undefined=(parser._datasRemoteSource.withCredentials) ? "include" : "omit"; const credentials : RequestCredentials|undefined=(parser._datasRemoteSource.withCredentials) ? "include" : "omit";
const settings={ const settings={ method: "GET", headers: headers, credentials: credentials };
method: "GET",
headers: headers,
credentials: credentials,
};
const response=await fetch(parser._datasRemoteSource.url, settings); const response=await fetch(parser._datasRemoteSource.url, settings);
if (! response.ok) if (! response.ok)
throw new Error(errors.parserRemoteFail); throw new Error(errors.parserRemoteFail);