aboutsummaryrefslogtreecommitdiff
path: root/includes/fetcher/node_modules/axios/lib/adapters/README.md
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2022-04-14 17:43:06 +0200
committerMinteck <contact@minteck.org>2022-04-14 17:43:06 +0200
commit3071764c42c63f47cd76d80b5b90fe280ac9f0ab (patch)
tree2458441ce5218cc88a8be165b364f174a9ba8e3b /includes/fetcher/node_modules/axios/lib/adapters/README.md
parentf6e5be4e0ef648d3eb1d8a12edcb48dbb8c31037 (diff)
downloadember-3071764c42c63f47cd76d80b5b90fe280ac9f0ab.tar.gz
ember-3071764c42c63f47cd76d80b5b90fe280ac9f0ab.tar.bz2
ember-3071764c42c63f47cd76d80b5b90fe280ac9f0ab.zip
Fetcher
Diffstat (limited to 'includes/fetcher/node_modules/axios/lib/adapters/README.md')
-rw-r--r--includes/fetcher/node_modules/axios/lib/adapters/README.md37
1 files changed, 37 insertions, 0 deletions
diff --git a/includes/fetcher/node_modules/axios/lib/adapters/README.md b/includes/fetcher/node_modules/axios/lib/adapters/README.md
new file mode 100644
index 0000000..68f1118
--- /dev/null
+++ b/includes/fetcher/node_modules/axios/lib/adapters/README.md
@@ -0,0 +1,37 @@
+# axios // adapters
+
+The modules under `adapters/` are modules that handle dispatching a request and settling a returned `Promise` once a response is received.
+
+## Example
+
+```js
+var settle = require('./../core/settle');
+
+module.exports = function myAdapter(config) {
+ // At this point:
+ // - config has been merged with defaults
+ // - request transformers have already run
+ // - request interceptors have already run
+
+ // Make the request using config provided
+ // Upon response settle the Promise
+
+ return new Promise(function(resolve, reject) {
+
+ var response = {
+ data: responseData,
+ status: request.status,
+ statusText: request.statusText,
+ headers: responseHeaders,
+ config: config,
+ request: request
+ };
+
+ settle(resolve, reject, response);
+
+ // From here:
+ // - response transformers will run
+ // - response interceptors will run
+ });
+}
+```