Skip to content

Commit b9bc0b0

Browse files
committed
Removes misleading readme information
1 parent 3d7ca38 commit b9bc0b0

File tree

1 file changed

+1
-33
lines changed

1 file changed

+1
-33
lines changed

README.md

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55

66
Simple [axios](https://github.com/axios/axios) HTTP middleware service.
77

8-
Explore [**the documentation**](https://emileber.github.io/axios-middleware/).
9-
108
## Installation
119

1210
```
@@ -15,34 +13,4 @@ npm install --save axios-middleware
1513

1614
## How to use
1715

18-
A simple example using the [simplified middleware syntax](https://emileber.github.io/axios-middleware/#/simplified-syntax).
19-
20-
```javascript
21-
import axios from 'axios';
22-
import { HttpMiddlewareService } from 'axios-middleware';
23-
24-
// Create a new service instance
25-
const service = new HttpMiddlewareService(axios);
26-
27-
// Then register your middleware instances.
28-
service.register({
29-
onRequest(config) {
30-
// handle the request config
31-
return config;
32-
},
33-
onSync(promise) {
34-
// handle the promsie
35-
return promise;
36-
},
37-
onResponse(response) {
38-
// handle the response
39-
return response;
40-
}
41-
});
42-
43-
// We're good to go!
44-
export default service;
45-
```
46-
47-
A common use-case would be to expose an instance of the service which consumes an _axios_ instance configured for an API. It's then possible to register middlewares for this API at different stages of the initialization process of an application.
48-
16+
Explore [**the documentation**](https://emileber.github.io/axios-middleware/) or the `docs/` directory.

0 commit comments

Comments
 (0)