Skip to content

Commit 82fcc9c

Browse files
Revert "fix(http): add missing http options allowed in fetch API (#62881)" (#62899)
This reverts commit ab60339. PR Close #62899
1 parent ab60339 commit 82fcc9c

File tree

2 files changed

+0
-38
lines changed

2 files changed

+0
-38
lines changed

packages/common/http/src/client.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,12 @@ function addBody<T>(
5858
reportProgress: options.reportProgress,
5959
responseType: options.responseType,
6060
withCredentials: options.withCredentials,
61-
credentials: options.credentials,
6261
transferCache: options.transferCache,
6362
keepalive: options.keepalive,
6463
priority: options.priority,
6564
cache: options.cache,
6665
mode: options.mode,
6766
redirect: options.redirect,
68-
integrity: options.integrity,
69-
referrer: options.referrer,
7067
};
7168
}
7269

packages/common/http/test/client_spec.ts

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -148,41 +148,6 @@ describe('HttpClient', () => {
148148
expect(testReq.request.body).toBe(body);
149149
testReq.flush('hello world');
150150
});
151-
it('validates all fetch API options are properly handled', (done) => {
152-
client
153-
.post(
154-
'/test',
155-
{},
156-
{
157-
credentials: 'include',
158-
cache: 'force-cache',
159-
priority: 'high',
160-
mode: 'cors',
161-
redirect: 'follow',
162-
referrer: 'www.example.com',
163-
integrity: 'sha256-abc',
164-
timeout: 1000,
165-
keepalive: true,
166-
withCredentials: true,
167-
},
168-
)
169-
.subscribe(() => {
170-
done();
171-
});
172-
const testReq = backend.expectOne('/test');
173-
expect(testReq.request.credentials).toBe('include');
174-
expect(testReq.request.cache).toBe('force-cache');
175-
expect(testReq.request.priority).toBe('high');
176-
expect(testReq.request.mode).toBe('cors');
177-
expect(testReq.request.redirect).toBe('follow');
178-
expect(testReq.request.referrer).toBe('www.example.com');
179-
expect(testReq.request.integrity).toBe('sha256-abc');
180-
expect(testReq.request.timeout).toBe(1000);
181-
expect(testReq.request.keepalive).toBe(true);
182-
expect(testReq.request.withCredentials).toBe(true);
183-
expect(testReq.request.body).toEqual({});
184-
testReq.flush({});
185-
});
186151
it('with a json body of false', (done) => {
187152
client.post('/test', false, {observe: 'response', responseType: 'text'}).subscribe((res) => {
188153
expect(res.ok).toBeTruthy();

0 commit comments

Comments
 (0)