Skip to content

Commit

Permalink
Merge pull request #3 from ColdMoonMao/master
Browse files Browse the repository at this point in the history
docs(net.md): add english version
  • Loading branch information
cipchk authored Dec 14, 2017
2 parents 09de71b + 4d04e4d commit c585500
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions docs/net.en-US.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
order: 4
title:
en-US: Network
zh-CN: 网络请求
type: Basic
---

ng-alain There are two default processings for any network request。

## 1、Expand HttpClient

`@delon/theme` Contains a class called [_HttpClient](//github.com/cipchk/delon/blob/master/src/core/theme/services/http/http.client.ts) ,The essence is calling Angular's `HttpClient`,just wrapping add `loading`

We know that ng-zorro-antd is flooded with a large number of `nzLoading` attributes, which allows for a more user-friendly loading of web requests so that we do not have to maintain a` loadind` variable on every business page。

Of course, not only that,`_HttpClient` Also unified processing of all time data format for the timestamp, which for the front-end state to ensure the consistency of the data has a good effect。

## 2、The default interceptor

The benefits of interceptors are self-evident;Uniform handling server request prefix,Uniform add `token` for each request,and so on。

The `src / app / core / net / default.interceptor.ts` file provides an implementation of the interceptor, you can tailor to your own needs。
File renamed without changes.

0 comments on commit c585500

Please sign in to comment.