Skip to content

Commit

Permalink
refactor: removing js xhr
Browse files Browse the repository at this point in the history
  • Loading branch information
erunion committed Sep 5, 2024
1 parent 8cf66c9 commit fd170ff
Show file tree
Hide file tree
Showing 24 changed files with 4 additions and 454 deletions.
14 changes: 3 additions & 11 deletions src/helpers/__snapshots__/utils.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,6 @@ exports[`availableTargets > returns all available targets 1`] = `
},
{
"clients": [
{
"description": "W3C Standard API that provides scripted client functionality",
"extname": ".js",
"key": "xhr",
"link": "https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest",
"title": "XMLHttpRequest",
},
{
"description": "Promise based HTTP client for the browser and node.js",
"extname": ".js",
Expand All @@ -150,7 +143,7 @@ exports[`availableTargets > returns all available targets 1`] = `
"title": "jQuery",
},
],
"default": "xhr",
"default": "fetch",
"key": "javascript",
"title": "JavaScript",
},
Expand Down Expand Up @@ -194,11 +187,10 @@ exports[`availableTargets > returns all available targets 1`] = `
"title": "Axios",
},
{
"description": "Simplified HTTP node-fetch client",
"description": "Perform asynchronous HTTP requests with the Fetch API",
"extname": ".cjs",
"installation": "npm install node-fetch@2 --save",
"key": "fetch",
"link": "https://github.com/bitinn/node-fetch",
"link": "https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch",
"title": "Fetch",
},
],
Expand Down
4 changes: 1 addition & 3 deletions src/targets/javascript/target.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,15 @@ import type { Target } from '../index.js';
import { axios } from './axios/client.js';
import { fetch } from './fetch/client.js';
import { jquery } from './jquery/client.js';
import { xhr } from './xhr/client.js';

export const javascript: Target = {
info: {
key: 'javascript',
title: 'JavaScript',
default: 'xhr',
default: 'fetch',
},

clientsById: {
xhr,
axios,
fetch,
jquery,
Expand Down
19 changes: 0 additions & 19 deletions src/targets/javascript/xhr/client.test.ts

This file was deleted.

102 changes: 0 additions & 102 deletions src/targets/javascript/xhr/client.ts

This file was deleted.

15 changes: 0 additions & 15 deletions src/targets/javascript/xhr/fixtures/application-form-encoded.js

This file was deleted.

34 changes: 0 additions & 34 deletions src/targets/javascript/xhr/fixtures/application-json.js

This file was deleted.

15 changes: 0 additions & 15 deletions src/targets/javascript/xhr/fixtures/cookies.js

This file was deleted.

13 changes: 0 additions & 13 deletions src/targets/javascript/xhr/fixtures/cors.js

This file was deleted.

14 changes: 0 additions & 14 deletions src/targets/javascript/xhr/fixtures/custom-method.js

This file was deleted.

17 changes: 0 additions & 17 deletions src/targets/javascript/xhr/fixtures/full.js

This file was deleted.

18 changes: 0 additions & 18 deletions src/targets/javascript/xhr/fixtures/headers.js

This file was deleted.

14 changes: 0 additions & 14 deletions src/targets/javascript/xhr/fixtures/http-insecure.js

This file was deleted.

17 changes: 0 additions & 17 deletions src/targets/javascript/xhr/fixtures/jsonObj-multiline.js

This file was deleted.

17 changes: 0 additions & 17 deletions src/targets/javascript/xhr/fixtures/jsonObj-null-value.js

This file was deleted.

16 changes: 0 additions & 16 deletions src/targets/javascript/xhr/fixtures/multipart-data.js

This file was deleted.

Loading

0 comments on commit fd170ff

Please sign in to comment.