Skip to content

Commit

Permalink
fix(http): remove some useless codes
Browse files Browse the repository at this point in the history
  • Loading branch information
HyperLife1119 committed Sep 30, 2022
1 parent 2347464 commit 19ad95b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/http/src/backends/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ export class HttpFetchBackend implements HttpBackend {
let headers: HttpHeaders;

return of({ type: HttpEventType.Sent }).pipe(
concatMap(() => fromFetch<Response>(request.urlWithParams, {
// @ts-expect-error
selector: undefined,
concatMap(() => fromFetch(request.urlWithParams, {
method: request.method,
headers: request.headers.keys().reduce((headers, name) => (
headers[name] = request.headers.getAll(name)!.join(','),
Expand All @@ -34,7 +32,7 @@ export class HttpFetchBackend implements HttpBackend {
body: request.serializeBody(),
...request.context.get(FETCH_TOKEN)
})),
switchMap<Response, Observable<ArrayBuffer | Blob | Object | string>>(response => {
switchMap(response => {
url = response.url;
status = response.status;
statusText = response.statusText;
Expand Down

0 comments on commit 19ad95b

Please sign in to comment.