Skip to content

Commit

Permalink
doc(plugins/http-services): link to DI. Closes aurelia#477
Browse files Browse the repository at this point in the history
It doesn't fit optimal, but when I first read the docs regarding HttpClient, I wondered _how_ to wrap the client in a custom service.
This way, there's at least a starting point.
  • Loading branch information
Ryuno-Ki authored Apr 7, 2020
1 parent e7b2e8b commit 7478b16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion current/en-us/7. plugins/1. http-services.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export function configure(aurelia: Aurelia): void {
```

> Info: Encapsulate HttpClient Use
> Generally, we recommend that you don't litter your application code with usage of the HttpClient. Instead, we reccommend that you create one or more service classes that encapsulate all HTTP access behind a friendly, application-specific API. If you do this, we also recommend that you import the `fetch` polyfill inside these service modules rather than in your application's main module. This helps to preserve the encapsulation.
> Generally, we recommend that you don't litter your application code with usage of the HttpClient. Instead, we reccommend that you [create one or more service classes that encapsulate all HTTP access](docs/fundamentals/dependency-injection#injection) behind a friendly, application-specific API. If you do this, we also recommend that you import the `fetch` polyfill inside these service modules rather than in your application's main module. This helps to preserve the encapsulation.
### Basic Use

Expand Down

0 comments on commit 7478b16

Please sign in to comment.