diff --git a/public/docs/ts/latest/guide/server-communication.jade b/public/docs/ts/latest/guide/server-communication.jade index a92cf02ff7..5f23812736 100644 --- a/public/docs/ts/latest/guide/server-communication.jade +++ b/public/docs/ts/latest/guide/server-communication.jade @@ -13,79 +13,82 @@ block includes .l-sub-section :marked The [`WebSocket`](https://tools.ietf.org/html/rfc6455) protocol is another important communication technology; - we won't cover it in this chapter. + it isn't covered in this page. [`WebSocket`](https://tools.ietf.org/html/rfc6455)协议是另一种重要的通讯技术,但本章不会涉及它。 :marked - Modern browsers support two HTTP-based APIs: - [XMLHttpRequest (XHR)](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) and + Modern browsers support two HTTP-based APIs: + [XMLHttpRequest (XHR)](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) and [JSONP](https://en.wikipedia.org/wiki/JSONP). A few browsers also support - [Fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). + [Fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). 现代浏览器支持两种基于HTTP的API: [XMLHttpRequest (XHR)](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest)和 [JSONP](https://en.wikipedia.org/wiki/JSONP)。少数浏览器还支持 [Fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)。 - The !{_Angular_http_library} simplifies application programming of the **XHR** and **JSONP** APIs - as we'll learn in this chapter covering: + The !{_Angular_http_library} simplifies application programming with the **XHR** and **JSONP** APIs. + This page covers: !{_Angular_http_libraryCn}简化了**XHR**和**JSONP** API的编程,这就是本章所要讲的。 - - [HTTP client sample overview](#http-client) + - [The Tour of Heroes *HTTP* client demo](#http-client). - - [HTTP客户端范例概览](#http-client) + - [英雄指南范例的HTTP客户端](#http-client) - - [Fetch data with http.get](#fetch-data) + - [Fetch data with http.get](#fetch-data). - [用http.get获取数据](#fetch-data) -
  • [RxJS Observable of HTTP Responses](#rxjs)
  • +
  • [RxJS library](#rxjs).
  • -
  • [HTTP响应中的RxJS可观察对象](#rxjs)
  • +
  • [RxJS库](#rxjs)
  • -
  • [Enabling RxJS Operators](#enable-rxjs-operators)
  • +
  • [Enable RxJS operators](#enable-rxjs-operators).
  • [启用RxJS操作符](#enable-rxjs-operators)
  • - - [Extract JSON data](#extract-data) + - [Process the response object](#extract-data). - - [提取JSON数据](#extract-data) + - [处理响应对象](#extract-data) - - [Error handling](#error-handling) + - [Always handle errors](#error-handling). - - [错误处理](#error-handling) + - [总是处理错误](#error-handling) - - [Send data to the server](#update) + - [Send data to the server](#update). - [把数据发送到服务器](#update) -
  • [Promises instead of observables](#promises)
  • - +
  • [Fall back to promises](#promises).
  • +
  • [使用承诺(Promise)来取代可观察对象(Observable)](#promises)
  • - - [Cross-origin requests: Wikipedia example](#cors) + - [Cross-Origin Requests: Wikipedia example](#cors). - [跨域请求:Wikipedia例子](#cors) -