Some test cases incorrectly rely on the side effect of other test cases
importing `NgMatchers`. This commit fixes this by making `expect` in
`core/testing_internal` properly typed.
This remove a breaking change introduced with commit #e7a8e2757b06d572f614f53b648d2fd75df370d2 where json objects passed to requests were not converted into string.
BREAKING CHANGE:
The behavior in this commit is the same as before PR 7260 : the objects sent with the request are converted to a string, therefore there is no need for the user to take care of the serialization.
Fixes#10073
This implements a new class, QueryEncoder, that provides
methods for encoding keys and values of query parameter.
The encoder encodes with encodeURIComponent, and then
decodes a whitelist of allowed characters back to their
unencoded form.
BREAKING CHANGE:
The changes to Http's URLSearchParams serialization now
prevent encoding of these characters inside query parameters
which were previously converted to percent-encoded values:
@ : $ , ; + ; ? /
The default encoding behavior can be overridden by extending
QueryEncoder, as documented in the URLSearchParams service.
Fixes#9348
- ts-api-guardian will now error if a new public symbol is added with a stability marker (`@stable`, `@experimental`, `@deprecated`)
- DomEventsPlugin and KeyEventsPlugin were removed from public api surface - these classes is an implementation detail
- deprecated BROWSER_PROVIDERS was removed completely
- `@angular/compiler` was removed from the ts-api-guardian check since this package shouldn't contain anything that users need to directly import
- the rest of the api surface was conservatively marked as stable or experimental
BREAKING CHANGES: DomEventsPlugin and KeyEventsPlugin previously exported from core are no longer public - these classes are implementation detail.
Previously deprecated BROWSER_PROVIDERS was completely removed from platform-browser.
Closes#9236Closes#9235
Ref #9234
This lets users continue using runtime-sideeffect Decorators if they choose,
only down-leveling the marked ones to Annotations.
Also remove the "skipTemplateCodegen" option, which is no longer needed
since Angular compiles with tsc-wrapped rather than ngc. The former doesn't
include any codegen.
Fix a bug due to which setting a custom Content-Type header in the
Request led to multiple Content-Types being set on the sent
XMLHttpRequest: first the detected content type based on the request
body, followed by the custom set content type.
Fix#9130.
it is not needed there because it will get transitively installed by @angular/platform-browser
we only need to declare this dependency in tsconfig.json because tsconfig.json's
do not support transitive dependencies in this way.
* test: add tree-shaking test
currently this doesn't throw or break the build, first we need to resolve all
of the existing issues.
to run execute: ./tools/tree-shaking-test/test.sh
then inspect dist/tree-shaking/test/**/*.bundle.js
* fix(http): remove peerDep on @angular/common
it is not needed there because it will get transitively installed by @angular/platform-browser
we only need to declare this dependency in tsconfig.json because tsconfig.json's
do not support transitive dependencies in this way.
Automatically recognize XSRF protection cookies, and set a corresponding XSRF
header. Allows applications to configure the cookie names, or if needed,
completely override the XSRF request configuration by binding their own
XSRFHandler implementation.
Part of #8511.
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/65Closes#7281Closes#7281
Implement the ability to provide objects as request body. The following use cases
are supported:
* raw objects: a JSON payload is created and the content type set to `application/json`
* text: the text is used as it is and no content type header is automatically added
* URLSearchParams: a form payload is created and the content type set to `application/x-www-form-urlencoded`
* FormData: the object is used as it is and no content type header is automatically added
* Blob: the object is used as it is and the content type set with the value of its `type` property if any
* ArrayBuffer: the object is used as it is and no content type header is automatically added
Closes https://github.com/angular/http/issues/69Closes#7310