85 Commits

Author SHA1 Message Date
Miško Hevery
738d93caf7 refactor: rewrite private export using the ɵ prefix 2017-02-21 20:48:55 -08:00
Victor Berchet
2ddd1c3ed2 Revert "fix(http): Make ResponseOptionsArgs an interface (#14607)"
This reverts commit fbe4b76f2d34e062a67be307053d56e24f8d6240.
2017-02-20 19:48:53 -08:00
Victor Berchet
fbe4b76f2d fix(http): Make ResponseOptionsArgs an interface (#14607)
closes #13708
2017-02-20 17:55:03 -08:00
Miško Hevery
4676df5833 fix(http): REVERT: remove dots from jsonp callback name (#13219)
This reverts commit 9e5617e41e222d29c3952ba71a401804030cd153.
2017-02-09 15:34:12 -06:00
cexbrayat
5f2b3173d7 fix(http): use params without RequestOptions (#14101)
`params` has been introduced in 4.0.0-beta.0

Before:

    http.get(url, new RequestOptions({params: searchParams}))

After:

    http.get(url, {params: searchParams})

Fixes #14100

PR Close #14101
2017-01-31 15:44:49 -06:00
Dzmitry Shylovich
9e5617e41e fix(http): remove dots from jsonp callback name (#13219)
PR Close #13219
2017-01-29 11:49:40 -06:00
Peter Bacon Darwin
2dd9654004 docs(http): vanilla links do not need link tags (#14097) 2017-01-26 23:46:51 -08:00
Dzmitry Shylovich
1200cf25f4 fix(http): don't create a blob out of ArrayBuffer when type is application/octet-stream (#13992)
Closes #13973
2017-01-18 16:01:02 -08:00
José Nicodemos Maia Neto
dc63cef10a docs(http): Spelling Fix #13867 2017-01-12 09:55:49 -08:00
Dzmitry Shylovich
2e500cc85b fix(http): create a copy of headers when merge options (#13365)
Closes #11980
2016-12-12 11:16:34 -08:00
domusofsail
08ff2e5249 fix(http): check response body text against undefined (#13017) 2016-12-09 15:39:39 -08:00
Dzmitry Shylovich
90c223591f feat(http): simplify URLSearchParams creation (#13338)
Closes #8858
2016-12-09 15:38:29 -08:00
Miško Hevery
16efb13dd1 fix: display framework version on bootstrapped component (#13252) 2016-12-06 16:21:07 -08:00
Dzmitry Shylovich
986abbe0b2 fix(http): set the default Accept header (#12989)
Fixes #6354
2016-12-06 16:20:43 -08:00
Flounn
94b8612e4e Fix(http): invalidStateError response body
Check on null value failed with last version of mozilla.
Check on undefined type instead.
2016-11-28 14:36:32 -08:00
João Dias
13ba2f90b9 refactor(http): remove all facade methods from http module (#12870) 2016-11-15 09:19:14 -08:00
Dzmitry Shylovich
1d53a870dd fix(http): return request url if it cannot be retrieved from response
closes #12837
2016-11-14 12:54:43 -08:00
Dzmitry Shylovich
a0c58a6b5c fix(http): correctly handle response body for 204 status code
closes #12830
fixes #12393
2016-11-14 12:36:22 -08:00
Dzmitry Shylovich
d3eff6c483 refactor(xhr_backend): remove facade 2016-11-14 12:36:16 -08:00
Joao Dias
77ee27c59e refactor(): use const and let instead of var 2016-11-12 16:40:17 -08:00
Victor Berchet
ec92f4b198 refactor: remove keys() and values() from MapWrapper 2016-11-04 13:27:38 -07:00
Alex Rickabaugh
121e5080aa fix(http): preserve header case when copying headers (#12697) 2016-11-04 13:26:38 -07:00
Barna Tóth
b4265e0685 fix(xsrf): overwrite already set xsrf header 2016-10-26 14:55:24 -07:00
Victor Berchet
76dd026447 refactor: remove some facades (#12335) 2016-10-19 13:42:39 -07:00
Martin Probst
8409b65153 fix(http): make normalizeMethodName optimizer-compatible. (#12370)
`normalizeMethodName` reflectively accessed the RequestMethod enum. With a smart
optimizer, properties from the enum could be removed or renamed, and so user
code just passing in e.g. 'PATCH' might not work. This change fixes the code to
be more explicit and avoids the optimizer issue.
2016-10-18 11:21:54 -07:00
Dzmitry Shylovich
8603d9c269 refactor(http): use Http.request for all http shorthand methods (#12319) 2016-10-17 23:04:25 -07:00
Victor Berchet
f4566f8128 fix(http): fix Headers initialization from Headers and Object (#12106) 2016-10-06 15:21:27 -07:00
Victor Berchet
a67c06708d fix(http): Headers.append should append to the list 2016-10-06 15:21:03 -07:00
Alex Eagle
8c975ed156 refactor(facade): inline StringWrapper (#12051) 2016-10-06 15:10:27 -07:00
Victor Berchet
ed9c2b6281 fix(Header): preserve case of the first init, set() or append() (#12023)
fixes #11624
2016-10-03 15:27:56 -07:00
alexbyk
bf7b82b658 fix(UrlSearchParams): change a behavior when a param value is null or undefined (#11990) 2016-09-30 09:57:26 -07:00
Alex Eagle
0286956107 refactor(facade): Inline isBlank called with object-type argument (#11992) 2016-09-30 09:26:53 -07:00
Alex Eagle
41c8c30973 chore(lint): remove unused imports (#11923)
This was done automatically by tslint, which can now fix issues it finds.
The fixer is still pending in PR https://github.com/palantir/tslint/pull/1568
Also I have a local bugfix for https://github.com/palantir/tslint/issues/1569
which causes too many imports to be deleted.
2016-09-27 17:12:25 -07:00
Victor Berchet
58605cf350 refactor(facade): remove useless facades 2016-09-27 16:13:09 -07:00
Flounn
5ab5cc77bb Fix(http): invalidStateError if response body without content (#11786)
Fix(http): invalidStateError if response body without content
If the responseType has been specified and other than 'text', responseText throw an InvalidStateError exception

See XHR doc => https://xhr.spec.whatwg.org/#the-responsetext-attribute

Unit Test to prevent invalidStateError
2016-09-24 05:44:01 +09:00
Victor Berchet
671f73448c refactor: misc cleanup (#11654) 2016-09-19 17:15:57 -07:00
Igor Minar
71ae2c4525 refactor(webworkers): move webworkers to separate @angular/platform-webworker and @angular/platform-webworker-dynamic packages
BREAKING CHANGE: web worker platform is now exported via separate packages.

Please use @angular/platform-webworker and @angular/platform-webworker-dynamic
2016-08-30 21:07:45 -07:00
Miško Hevery
979657989b fix(packages): use ES modules for primary build (#11120) 2016-08-30 18:07:40 -07:00
Florian Knop
75553200c0 fix(http): encode correct value for %3D (#9790) 2016-08-26 15:47:29 -07:00
Misko Hevery
7c07bfff97 fix(errors): [2/2] Rename Exception to Error; remove from public API
BREAKING CHANGE:

Exceptions are no longer part of the public API. We don't expect that anyone should be referring to the Exception types.

ExceptionHandler.call(exception: any, stackTrace?: any, reason?: string): void;
change to:
ErrorHandler.handleError(error: any): void;
2016-08-26 10:37:17 -07:00
Marc Laval
66df335998 chore(dependencies): switch from es6-shim to core-js (#10884) 2016-08-25 17:28:36 -07:00
Marcus Krahl
654ff6115a fix(http): deep copy for constructor using existing Headers (#10679)
When creating a new Headers object using an existing Headers object
the existing Headers map is copied by reference. Therefore adding a
new Header value to the new Headers object also added this value to
the existing Headers object which is not in accordance with the
spec.
This commit alters the constructor to create a deep copy of existing
Headers maps and therefore unlink existing Headers from new Headers.

Closes #6845

BREAKING CHANGE: 

any code which relies on the fact that a newly
created Headers object is referencing an existing Headers map is
now broken, but that should normally not be the case since this
behavior is not documented and not in accordance with the spec.
2016-08-18 15:00:44 -07:00
Hans
40e160c22c fix(platform-browser-dynamic): Rename CACHED_TEMPLATE_PROVIDER to RESOURCE_CACHE_PROVIDER (#10866)
* fix(platform-browser-dynamic): Rename CACHED_TEMPLATE_PROVIDER to RESOURCE_CACHE_PROVIDER

Closes #9741

BREAKING CHANGE:

`CACHED_TEMPLATE_PROVIDER` is now renamed to `RESOURCE_CACHE_PROVIDER`

Before:

```js
import {CACHED_TEMPLATE_PROVIDER} from '@angular/platform-browser-dynamic';
```

After:

```js
import {RESOURCE_CACHE_PROVIDER} from '@angular/platform-browser-dynamic';
```

* Rename XHR -> ResourceLoader
2016-08-17 09:24:44 -07:00
Daniel Leib
7cd4741fcb fix(http): return empty string if no body is present (#10668) 2016-08-11 21:40:18 -07:00
Alex Eagle
7fac4efede chore(facades): missed a couple places in #10620 (#10661)
This lets us skip src/facade/exception* when compiling modules other than core
2016-08-11 08:39:13 -07:00
Alex Eagle
6f4ee6101c chore(imports): don't import ExceptionHandler from facade (#10620)
This lets us skip src/facade/exception* when compiling modules other than core.
It prevents having many conflicting declarations
2016-08-10 15:55:18 -07:00
Damien Cassan
0bd97ecda2 feat(http): add options method to Http (#10540)
Add options method to the Http object, which could be useful when using self-describing RESTful APIs.

This closes #10500, closes #7918
2016-08-08 09:15:13 -07:00
Jason Choi
99989f5d3f chore(facade): remove most facade/async functions 2016-08-05 12:26:28 -07:00
Victor Berchet
13c8211065 fix: String.split(str, n) stops after n separator (#10408) 2016-08-01 11:33:35 -07:00
Cody-Nicholson
251953218c fix(http): URLSearchParams.clone propagate the QueryEncoder (#9900) 2016-07-30 19:01:20 -07:00