feat(http): added withCredentials support

Taken into account the withCredentials property within the request options:
- added corresponding property in the RequestOptions class
- added corresponding property in the Request class
- handle this property when merging options
- set the withCredentials property on the XHR object when specified

Added a test in the xhr_backend_spec.ts to check that the property is actually
set on the XHR object

Closes https://github.com/angular/http/issues/65

Closes #7281

Closes #7281
This commit is contained in:
Thierry Templier
2016-02-24 22:57:35 +01:00
committed by Misko Hevery
parent 0f0a8ade7c
commit 95af14b97c
6 changed files with 40 additions and 4 deletions

View File

@ -23,7 +23,8 @@ function mergeOptions(defaultOpts: BaseRequestOptions, providedOpts: RequestOpti
url: providedOpts.url || url,
search: providedOpts.search,
headers: providedOpts.headers,
body: providedOpts.body
body: providedOpts.body,
withCredentials: providedOpts.withCredentials
}));
}
if (isPresent(method)) {