XHRConnection

XHRConnection

Experimental Class

Class Overview

class XHRConnection implements Connection {
  constructor(req: Request, browserXHR: BrowserXhr, baseResponseOptions?: ResponseOptions)
  
  
  request : Request
  response : Observable<Response>
  readyState : ReadyState
  setDetectedContentType(req: any, _xhr: any)
}

Class Description

Creates connections using XMLHttpRequest. Given a fully-qualified request, an XHRConnection will immediately create an XMLHttpRequest object and send the request.

This class would typically not be created or interacted with directly inside applications, though the MockConnection may be interacted with in tests.

Constructor

constructor(req: Request, browserXHR: BrowserXhr, baseResponseOptions?: ResponseOptions)

Class Details

request : Request
response : Observable<Response>

Response EventEmitter which emits a single Response value on load event of XMLHttpRequest.

readyState : ReadyState
setDetectedContentType(req: any, _xhr: any)

exported from http-index, defined in http/src/backends/xhr_backend.ts

© 2010–2017 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://angular.io/docs/ts/latest/api/http/index/XHRConnection-class.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部