Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return operations.reduce((headers: HttpHeaders, operation: Operation) => {
return mergeHeaders(headers, operation.getContext().headers);
}, this.options.headers);
}
withCredentials,
useMultipart,
headers: this.options.headers,
},
};
if (includeExtensions) {
(req.body as Body).extensions = operation.extensions;
}
if (includeQuery) {
(req.body as Body).query = print(operation.query);
}
if (context.headers) {
req.options.headers = mergeHeaders(
req.options.headers,
context.headers,
);
}
const sub = fetch(req, this.httpClient, extractFiles).subscribe({
next: response => {
operation.setContext({response});
observer.next(response.body);
},
error: err => observer.error(err),
complete: () => observer.complete(),
});
return () => {
if (!sub.closed) {