Skip to content

Commit fd170ff

Browse files
committed
refactor: removing js xhr
1 parent 8cf66c9 commit fd170ff

24 files changed

+4
-454
lines changed

src/helpers/__snapshots__/utils.test.ts.snap

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,6 @@ exports[`availableTargets > returns all available targets 1`] = `
120120
},
121121
{
122122
"clients": [
123-
{
124-
"description": "W3C Standard API that provides scripted client functionality",
125-
"extname": ".js",
126-
"key": "xhr",
127-
"link": "https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest",
128-
"title": "XMLHttpRequest",
129-
},
130123
{
131124
"description": "Promise based HTTP client for the browser and node.js",
132125
"extname": ".js",
@@ -150,7 +143,7 @@ exports[`availableTargets > returns all available targets 1`] = `
150143
"title": "jQuery",
151144
},
152145
],
153-
"default": "xhr",
146+
"default": "fetch",
154147
"key": "javascript",
155148
"title": "JavaScript",
156149
},
@@ -194,11 +187,10 @@ exports[`availableTargets > returns all available targets 1`] = `
194187
"title": "Axios",
195188
},
196189
{
197-
"description": "Simplified HTTP node-fetch client",
190+
"description": "Perform asynchronous HTTP requests with the Fetch API",
198191
"extname": ".cjs",
199-
"installation": "npm install node-fetch@2 --save",
200192
"key": "fetch",
201-
"link": "https://github.com/bitinn/node-fetch",
193+
"link": "https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch",
202194
"title": "Fetch",
203195
},
204196
],

src/targets/javascript/target.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,15 @@ import type { Target } from '../index.js';
33
import { axios } from './axios/client.js';
44
import { fetch } from './fetch/client.js';
55
import { jquery } from './jquery/client.js';
6-
import { xhr } from './xhr/client.js';
76

87
export const javascript: Target = {
98
info: {
109
key: 'javascript',
1110
title: 'JavaScript',
12-
default: 'xhr',
11+
default: 'fetch',
1312
},
1413

1514
clientsById: {
16-
xhr,
1715
axios,
1816
fetch,
1917
jquery,

src/targets/javascript/xhr/client.test.ts

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/targets/javascript/xhr/client.ts

Lines changed: 0 additions & 102 deletions
This file was deleted.

src/targets/javascript/xhr/fixtures/application-form-encoded.js

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/targets/javascript/xhr/fixtures/application-json.js

Lines changed: 0 additions & 34 deletions
This file was deleted.

src/targets/javascript/xhr/fixtures/cookies.js

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/targets/javascript/xhr/fixtures/cors.js

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/targets/javascript/xhr/fixtures/custom-method.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/targets/javascript/xhr/fixtures/full.js

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/targets/javascript/xhr/fixtures/headers.js

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/targets/javascript/xhr/fixtures/http-insecure.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/targets/javascript/xhr/fixtures/jsonObj-multiline.js

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/targets/javascript/xhr/fixtures/jsonObj-null-value.js

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/targets/javascript/xhr/fixtures/multipart-data.js

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)